Skip to content

Commit

Permalink
Fix warnings.
Browse files Browse the repository at this point in the history
Make sure we don't redefine an already-defined attribute method.
  • Loading branch information
jonleighton committed Sep 12, 2011
1 parent 99bd6b5 commit 3386a08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/attribute_methods.rb
Expand Up @@ -36,7 +36,7 @@ def instance_method_already_implemented?(method_name)

@@_defined_activerecord_methods ||= defined_activerecord_methods
raise DangerousAttributeError, "#{method_name} is defined by ActiveRecord" if @@_defined_activerecord_methods.include?(method_name)
@_defined_class_methods.include?(method_name)
@_defined_class_methods.include?(method_name) || generated_attribute_methods.method_defined?(method_name)
end

def defined_activerecord_methods
Expand Down

0 comments on commit 3386a08

Please sign in to comment.