aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorAngelo capilleri <capilleri@yahoo.com>2013-01-08 09:50:38 +0100
committerAngelo capilleri <capilleri@yahoo.com>2013-01-08 09:54:21 +0100
commitd9a9d31ec3d4ea0711f3a8d7bb118183cdb75793 (patch)
tree1bfc63494c3b06dd1a093bf52219dedf005b0be4 /activerecord
parente63e280bed3a0c7ef6925ae61e4322f730cce627 (diff)
downloadrails-d9a9d31ec3d4ea0711f3a8d7bb118183cdb75793.tar.gz
rails-d9a9d31ec3d4ea0711f3a8d7bb118183cdb75793.tar.bz2
rails-d9a9d31ec3d4ea0711f3a8d7bb118183cdb75793.zip
change unless !blank? to if blank? in get_primary_key
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/attribute_methods/primary_key.rb2
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