Skip to content
Browse files

Merge pull request #8800 from acapilleri/primary_key

refactor reset_primary_key and change !blank? to present? in get_primary...
  • Loading branch information...
2 parents e3aa78a + d9a9d31 commit de21da5048e426955b61f99ae71d37d5a9178d68 @pixeltrix pixeltrix committed Jan 8, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/attribute_methods/primary_key.rb
View
2 activerecord/lib/active_record/attribute_methods/primary_key.rb
@@ -76,7 +76,7 @@ def reset_primary_key #:nodoc:
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

0 comments on commit de21da5

Please sign in to comment.
Something went wrong with that request. Please try again.