Skip to content
This repository
Browse code

change unless !blank? to if blank? in get_primary_key

  • Loading branch information...
commit d9a9d31ec3d4ea0711f3a8d7bb118183cdb75793 1 parent e63e280
Angelo Capilleri acapilleri authored
2  activerecord/lib/active_record/attribute_methods/primary_key.rb
@@ -76,7 +76,7 @@ def reset_primary_key #:nodoc:
76 76 end
77 77
78 78 def get_primary_key(base_name) #:nodoc:
79   - return 'id' unless base_name && !base_name.blank?
  79 + return 'id' if base_name.blank?
80 80
81 81 case primary_key_prefix_type
82 82 when :table_name

0 comments on commit d9a9d31

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