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.

Paul Gillard's latest activity

Wednesday, June 23 2010
4894 Record Cloning Not Shallow was updated in Ruby on Rails
  • Paul Gillard
    Paul Gillard commented at 9:38 PM

    Second patch to remove incorrect comment re-based against master and attached.

  • Paul Gillard
    Paul Gillard commented at 11:02 AM

    Sorry for the confusion. My comments were simply to explain to Kane how my patch works. Its not an indication that there is a problem with the patch. I'm happy ...

  • Paul Gillard
    Paul Gillard commented at 9:16 AM

    The foreign key attribute doesn't get cleared just the instance variable on the object which contains the associated object. An (imagined) IRB session might be:

    ...
Friday, June 18 2010
4894 Record Cloning Not Shallow was updated in Ruby on Rails
  • Paul Gillard
    • Assigned user set to josh
    by Paul Gillard at 5:14 PM

    Josh, I hope you don't mind me assigning this to you? Koz assigned a previous ticket I worked on regarding cloning to you (#3164).

  • Paul Gillard
    • Tag changed from patch activerecord, clone to patch activerecord, clone, patch
    by Paul Gillard at 12:19 AM

    I attach two patches. One which clears the association cache when cloning and so returning cloning to being genuinely shallow. The other which removes an incorr...

  • Paul Gillard
    Paul Gillard created the ticket at 12:01 AM

    Problem

    Cloned Active Record objects receive the original object's associations.

    Explanation

    Roughly speaking Ruby clones objects by copying instance variables ...

Tuesday, October 06 2009
3164 Instantiate through initialize_copy when cloning was updated in Ruby on Rails
  • Paul Gillard
    Paul Gillard commented at 6:17 PM

    It would seem my second point is not a valid one. #initialize_copy only gets called through #dup and #clone and neither accept a block.

Tuesday, September 08 2009
3164 Instantiate through initialize_copy when cloning was created in Ruby on Rails
  • Paul Gillard
    Paul Gillard created the ticket at 10:49 AM

    As discussed here I'm attaching a patch which overrides #initialize_copy rather than #clone in order to implement cloning of AR objects. This will allow AR clas...

Tuesday, August 04 2009
1954 Dirty Objects: attribute_reset was updated in Ruby on Rails
  • Paul Gillard
    Paul Gillard commented at 8:08 PM

    I've reworked the changes into two patches against master as requested.

    The one thing I don't like about it is that there are now two ways in which method_missi...

Wednesday, July 29 2009
1954 Dirty Objects: attribute_reset was updated in Ruby on Rails
  • Paul Gillard
    Paul Gillard commented at 6:39 PM

    I wish I'd read my above comment once more. I meant your comment made sense to me rather than I thought the attribute_reset! name made sense. reset_attribute! i...