Permalink
Browse files

change unless !blank? to if blank? in get_primary_key

  • Loading branch information...
1 parent e63e280 commit d9a9d31ec3d4ea0711f3a8d7bb118183cdb75793 @acapilleri acapilleri committed Jan 8, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 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 d9a9d31

Please sign in to comment.