> Um... the patch I posted doesn't actually add a callback, it just > rejigs things so that > > def initialize(attrs = nil) > self.some_attrib = 'a default value' > super > end > > works as well as > > def initialize(attrs = nil) > super > self.some_attrib ||= 'a default value' > end
I'm not sold on the need for this in and of itself but if someone else feels it's justified I wouldn't object to them applying it. I'd prefer to see work done towards the correct fix than put something in that wouldn't be needed in the long term, and if we have currently motivated people, all the better :). > As for the public_instance_methods issue, when does a class find out > about its columns? Assuming columns is known about early enough before > any records are fetched from the database, it should be possible to > fake out public_instance_methods. The columns are lazily retrieved, but once they're retrieved it should be possible to generate all the accessors and mutators. You don't want to retrieve them too early as the database isn't always available, however it's definitely something that a motivated experimenter could investigate in a relatively short period of time. -- Cheers Koz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---