From c489b87d9d8e584541bc5b8f19c795eaff71a07d Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 19 Dec 2004 22:40:09 +0000 Subject: Dont define respond_to? lookups for primary key git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@230 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/lib/active_record/base.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activerecord/lib') 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 -- cgit v1.2.3