diff options
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 0f07af2d09..ff0d42f39e 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -529,6 +529,7 @@ module ActiveRecord #:nodoc: # is available. def column_methods_hash @dynamic_methods_hash ||= columns_hash.keys.inject(Hash.new(false)) do |methods, attr| + next if attr == primary_key methods[attr.to_sym] = true methods["#{attr}=".to_sym] = true methods["#{attr}?".to_sym] = true |