This project is archived and is in readonly mode.
[PATCH] Base.save should retain prefix_options
Reported by avijayr (at gmail) | July 22nd, 2009 @ 02:18 PM | in 3.x
This is similar to https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets... - in the sense that when you find an ActiveResource object (which is nested inside another AR), and then call save on it, the prefix_options are lost. This means that any subsequent calls to save or reload would not work without finding the object again.
The fix would be (in ActiveResource::Base) :
def load_attributes_from_response(response)
if response['Content-Length'] != "0" && response.body.strip.size > 0
load(@prefix_options.stringify_keys.merge(self.class.format.decode(response.body)))
end
end
Comments and changes to this ticket
-
Rohit Arondekar October 9th, 2010 @ 03:29 AM
- State changed from new to stale
- Importance changed from to
Marking ticket as stale. If this is still an issue please leave a comment with suggested changes, creating a patch with tests, rebasing an existing patch or just confirming the issue on a latest release or master/branches.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>