On Jul 24, 2007, at 11:15 AM, Pratik wrote:
> Anyways, I'm off this thread unless we see some patches. That makes > arguing a lot easier :-) --- vendor/rails/activerecord/lib/active_record/base.rb.org 2007-07-24 11:37:07.000000000 -0600 +++ vendor/rails/activerecord/lib/active_record/base.rb 2007-07-24 11:40:32.000000000 -0600 @@ -1502,10 +1502,14 @@ @attributes = attributes_from_column_definition @new_record = true ensure_proper_type - self.attributes = attributes unless attributes.nil? + self.attributes = (attributes || {}).stringify_keys.reverse_merge!(defaults.stringify_keys) yield self if block_given? end + def defaults + Hash.new + end + # A model instance's primary key is always available as model.id # whether you name it the default 'id' or set it to something else. def id a @ http://drawohara.com/ -- we can deny everything, except that we have the possibility of being better. simply reflect on that. h.h. the 14th dalai lama --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---