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:
commit
75780373af
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue