1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #16669 from aantix/dangerous_attribute_error_better_message

Improved the error messaging for the DangerousAttributeError exception
This commit is contained in:
Rafael Mendonça França 2014-09-12 17:10:56 -03:00
commit 75780373af

View file

@ -111,7 +111,7 @@ module ActiveRecord
# # => false
def instance_method_already_implemented?(method_name)
if dangerous_attribute_method?(method_name)
raise DangerousAttributeError, "#{method_name} is defined by Active Record"
raise DangerousAttributeError, "#{method_name} is defined by Active Record. Check to make sure that you don't have an attribute or method with the same name."
end
if superclass == Base