diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2013-01-08 02:56:59 -0800 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2013-01-08 02:56:59 -0800 |
commit | de21da5048e426955b61f99ae71d37d5a9178d68 (patch) | |
tree | 1ef52f36c661876f09338ab6047691b9304126d8 | |
parent | e3aa78a99e33844a07b89d7e2676177042c142dd (diff) | |
parent | d9a9d31ec3d4ea0711f3a8d7bb118183cdb75793 (diff) | |
download | rails-de21da5048e426955b61f99ae71d37d5a9178d68.tar.gz rails-de21da5048e426955b61f99ae71d37d5a9178d68.tar.bz2 rails-de21da5048e426955b61f99ae71d37d5a9178d68.zip |
Merge pull request #8800 from acapilleri/primary_key
refactor reset_primary_key and change !blank? to present? in get_primary...
-rw-r--r-- | activerecord/lib/active_record/attribute_methods/primary_key.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/primary_key.rb b/activerecord/lib/active_record/attribute_methods/primary_key.rb index 0857b02c8e..310f1b6e75 100644 --- a/activerecord/lib/active_record/attribute_methods/primary_key.rb +++ b/activerecord/lib/active_record/attribute_methods/primary_key.rb @@ -76,7 +76,7 @@ module ActiveRecord end def get_primary_key(base_name) #:nodoc: - return 'id' unless base_name && !base_name.blank? + return 'id' if base_name.blank? case primary_key_prefix_type when :table_name |