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

Changed the DangerousAttributeError exception message to include messaging that the conflict could be because of a conflicting attribute.

This commit is contained in:
Jim Jones 2014-09-10 21:40:00 -07:00
parent 1245a9e06c
commit 53e753bd80

View file

@ -111,7 +111,7 @@ module ActiveRecord
# # => false # # => false
def instance_method_already_implemented?(method_name) def instance_method_already_implemented?(method_name)
if dangerous_attribute_method?(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 end
if superclass == Base if superclass == Base