diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2004-12-19 23:11:06 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2004-12-19 23:11:06 +0000 |
commit | ef489ca2ad9f3dd65563803a95d99cc53b2a5a0a (patch) | |
tree | ecd7d6087245de0d4c16a3edffe1bf66e486bde8 /activerecord | |
parent | 2f26785425a8c96ffa7cb04cdf5c54eb0f247da2 (diff) | |
download | rails-ef489ca2ad9f3dd65563803a95d99cc53b2a5a0a.tar.gz rails-ef489ca2ad9f3dd65563803a95d99cc53b2a5a0a.tar.bz2 rails-ef489ca2ad9f3dd65563803a95d99cc53b2a5a0a.zip |
Pulling attributes_from_column_definition should set the primary id to nil instead of not at all
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@232 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord')
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 0f07af2d09..8f011947b3 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -1047,7 +1047,7 @@ module ActiveRecord #:nodoc: # that instances loaded from the database would. def attributes_from_column_definition connection.columns(self.class.table_name, "#{self.class.name} Columns").inject({}) do |attributes, column| - attributes[column.name] = column.default unless column.name == self.class.primary_key + attributes[column.name] = (column.default unless column.name == self.class.primary_key) attributes end end |