Ticket #9529: id_from_response.diff
| File id_from_response.diff, 0.7 kB (added by zippy, 10 months ago) |
|---|
-
vendor/rails/activeresource/lib/active_resource/base.rb
old new 809 809 810 810 # Takes a response from a typical create post and pulls the ID out 811 811 def id_from_response(response) 812 response['Location'][/\/([^\/]*?)(\.\w+)?$/, 1] 812 if response.has_key?('Location') 813 response['Location'][/\/([^\/]*?)(\.\w+)?$/, 1] 814 else 815 nil 816 end 813 817 end 814 818 815 819 def element_path(options = nil)