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.

This project is archived and is in readonly mode.

[PATCH] Added AR:B#dup method for duplicationg object without frozen attributes

#2859

Standard way to unfreeze object is to call dup method on it, but this does not working AR:B object, b/c in the ActiveRecord::Base methods #freeze and #frozen? overwritten for changing @attributes directly.

Here is simple patch with test for implementing #dup on AR:B.

Reported by Timur Vafin · June 30th, 2009 @ 07:18 PM

State: resolved
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. Repository
    Repository
    • State changed from new to resolved

    (from [16dc139caa9286638785469304a69ab77e4fe9b5]) Added AR:B#dup method for duplicationg object without frozen attributes [#2859 state:resolved]

    Signed-off-by: Yehuda Katz + Carl Lerche ykatz+clerche@engineyard.com
    http://github.com/rails/rails/commit/16dc139caa9286638785469304a69a...

    July 1st, 2009 @ 08:24 PM