Hi, I'm calling a rails app from another using ActiveResource. I need to supply the id of the new object to the first app (yes, controller create in this app knows how to handle receiving an id), so I do something like this:
a = ActiveResourceModel.new(:id => 1231231, :name => "test")
a.save
However, instead of doing POST to create a new resource it PUTs it, causing the receiving app to try to update the resource with id 1231231, which of course doesn't exist (I want to create it!), so I end up receiving a 404 error because of this.
Doing some testing the problem seems to be in ActiveResourceModel.new? which returns false, while ActiveResourceModel.exists? returns false too (Great, two methods which are supposed to be opposite return the same!).