aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-09-12 17:10:56 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-09-12 17:10:56 -0300
commit75780373af9a3ddd4cc1bda3d4dbfe6121102b2e (patch)
treef50dfe536a121f4da5cb7ea3d756039b55f72e11
parent867bc258c76d33c1c07056b915e52ea1dd7c54bd (diff)
parent53e753bd8061d6258f97100020ecfe5f79bcaff6 (diff)
downloadrails-75780373af9a3ddd4cc1bda3d4dbfe6121102b2e.tar.gz
rails-75780373af9a3ddd4cc1bda3d4dbfe6121102b2e.tar.bz2
rails-75780373af9a3ddd4cc1bda3d4dbfe6121102b2e.zip
Merge pull request #16669 from aantix/dangerous_attribute_error_better_message
Improved the error messaging for the DangerousAttributeError exception
-rw-r--r--activerecord/lib/active_record/attribute_methods.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/attribute_methods.rb b/activerecord/lib/active_record/attribute_methods.rb
index 36d0d63c71..f4a4e3f605 100644
--- a/activerecord/lib/active_record/attribute_methods.rb
+++ b/activerecord/lib/active_record/attribute_methods.rb
@@ -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