diff options
Diffstat (limited to 'activerecord/lib/active_record/base.rb')
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 3f0201a202..8af2c33ce5 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -1331,6 +1331,8 @@ module ActiveRecord #:nodoc: if @attributes.include?(method_name) define_read_methods if self.class.read_methods.empty? && self.class.generate_read_methods read_attribute(method_name) + elsif self.class.primary_key.to_s == method_name + id elsif md = /(=|\?|_before_type_cast)$/.match(method_name) attribute_name, method_type = md.pre_match, md.to_s if @attributes.include?(attribute_name) |