diff options
author | Ben Toews <mastahyeti@gmail.com> | 2017-08-10 11:21:22 -0600 |
---|---|---|
committer | Matthew Draper <matthew@trebex.net> | 2017-11-09 22:37:23 +1030 |
commit | 310c3a8f2d043f3d00d3f703052a1e160430a2c2 (patch) | |
tree | 69a6b9e697fc1078f327399b525f700e554001b7 /activerecord/lib | |
parent | 0cf5f2f048ab547edb0d017095a642126a87a879 (diff) | |
download | rails-310c3a8f2d043f3d00d3f703052a1e160430a2c2.tar.gz rails-310c3a8f2d043f3d00d3f703052a1e160430a2c2.tar.bz2 rails-310c3a8f2d043f3d00d3f703052a1e160430a2c2.zip |
beef up deprecation warning
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/attribute_methods.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/attribute_methods.rb b/activerecord/lib/active_record/attribute_methods.rb index b3d3c0559f..e167c4ad6f 100644 --- a/activerecord/lib/active_record/attribute_methods.rb +++ b/activerecord/lib/active_record/attribute_methods.rb @@ -179,9 +179,13 @@ module ActiveRecord if allow_unsafe_raw_sql == :deprecated ActiveSupport::Deprecation.warn( - "Dangerous query method used with non-attribute argument(s): " + - "#{unexpected.map(&:inspect).join(", ")}. Non-argument " + - "arguments will be disallowed in Rails 5.3." + "Dangerous query method (method whose arguments are used as raw " \ + "SQL) called with non-attribute argument(s): " \ + "#{unexpected.map(&:inspect).join(", ")}. Non-attribute " \ + "arguments will be disallowed in Rails 6.0. This method should " \ + "not be called with user-provided values, such as request " \ + "parameters or model attributes. Known-safe values can be passed " \ + "by wrapping them in Arel.sql()." ) else raise(ActiveRecord::UnknownAttributeReference, |