Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

There was a problem

You must be a member of this account.

This project is archived and is in readonly mode.

[PATCH] Base.save should retain prefix_options

#2939

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

Reported by avijayr (at gmail) · July 22nd, 2009 @ 02:18 PM

State: stale
Milestone: 3.x
Assigned to: nobody
Importance: none

Activity

  1. Jeremy Kemper
    Jeremy Kemper
    • Milestone changed from 2.x to 3.x

    May 4th, 2010 @ 06:48 PM

  2. Rohit Arondekar
    Rohit Arondekar
    • 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.

    October 9th, 2010 @ 03:29 AM