I have a resource there posting "host[name]=example.com" to it - creates a new host record with name example.com
The following works
curl http://localhost:3300/hosts.xml --request POST --data "host[name]=example.com"
Trying to do the same with activeresource fails
class Hosts < ActiveResource::Base
self.site = "http://localhost:3300/"
self.format = :xml
end
newhost = Hosts.new(:name => 'example.com')
newhost.save`
save returns true but no new host is created. Using find and destroy on existing host records works ok.
AFAIU Hosts.new(:name => 'example.com') does not generate the expected post data "host[name]=example.com". Is there a way I could make a new Host activeresource record to match the expected post data?