Well, when in doubt, check the source code. In 3.0, create checks new? 
which looks to see if id.nil? In 3.1 and above, it also checks new?, but 
now, new? checks to see if the object has been persisted (which is 
different from checking to see if id is defined).

On Tuesday, December 18, 2012 2:52:18 PM UTC-8, Chuck Han wrote:
>
> I'm upgrading my application from Rails 3.0 to Rails 3.2 (yeah, I know, 
> what happened to 3.1?), and I'm experiencing a difference in the REST call 
> when calling ActiveResource::create where the id is already defined.  In 
> 3.0, the app is sending a PUT.  In 3.1 and above, is sending a POST.  The 
> PUT seemed to make sense to me since the id already exists.
>
> Is there any documentation of this change?  Am I experiencing something 
> strange?
>
> Thanks in advance, Chuck
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/284Guk_KsnYJ.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to