aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/attribute_methods.rb10
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,