[Rails-core] Re: Validate absence of

2012-02-27 Thread Paul Gillard
er Noria wrote: > On Mon, Feb 27, 2012 at 10:15 AM, Paul Gillard wrote: > > I often need to validate the absence of active record fields. That > > validation being the direct opposite of validating the presence of a > > field. Would the core team be willing to accept a patch to

[Rails-core] Validate absence of

2012-02-27 Thread Paul Gillard
Hello Core, I often need to validate the absence of active record fields. That validation being the direct opposite of validating the presence of a field. Would the core team be willing to accept a patch to that effect? Thanks, Paul -- You received this message because you are subscribed to the

[Rails-core] Re: ActiveRecord object cloning

2009-10-06 Thread Paul Gillard
I've created a patch for this change which can be found at https://rails.lighthouseapp.com/projects/8994/tickets/3164. All the tests pass and #clone acts correctly. However I'd really appreciate some feedback on one niggling point regarding when the after_initialize callbacks get run. --~--~--

[Rails-core] ActiveRecord object cloning

2009-08-13 Thread Paul Gillard
In Ruby when an object is cloned the newly created object is initialized via #initialize_copy. Only new objects are initialized via #initialize. Currently ActiveRecord::Base overrides #clone and creates clones using #new. This means newly cloned objects are initialized via a combination of #clone

[Rails-core] Patch for review - Reset dirty attributes #1954

2009-07-16 Thread Paul Gillard
Hi, I've attached an updated patch to lighthouse ticket 1954 which implements the resetting of attributes on a model to their original values. The ticket was stale at the time I updated it and remained stale afterwards and so I'm not sure how many people would have seen it. I'd appreciate it if