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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/6uZcLFo1VQAJ.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Chuck Han at Dec 19, 2012 at 11:09 pm
    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+unsubscribe@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.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedDec 19, '12 at 9:34a
activeDec 19, '12 at 11:09p
posts2
users1
websiterubyonrails.org
irc#RubyOnRails

1 user in discussion

Chuck Han: 2 posts

People

Translate

site design / logo © 2022 Grokbase