aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation
diff options
context:
space:
mode:
authorKevin Deisz <kevin.deisz@gmail.com>2018-08-24 16:10:17 -0400
committerKevin Deisz <kevin.deisz@gmail.com>2018-08-24 16:10:17 -0400
commitc14859513a648270705b61210dc3ab2fe5d04004 (patch)
treedf253cd04ba9ffb7f4797eebe4af1031d1b0f5cc /activerecord/lib/active_record/relation
parente2d8a2ccfd3b0d2030920346a2ff0cad93fcb188 (diff)
downloadrails-c14859513a648270705b61210dc3ab2fe5d04004.tar.gz
rails-c14859513a648270705b61210dc3ab2fe5d04004.tar.bz2
rails-c14859513a648270705b61210dc3ab2fe5d04004.zip
Convert over the rest of the whitelist references
Diffstat (limited to 'activerecord/lib/active_record/relation')
-rw-r--r--activerecord/lib/active_record/relation/calculations.rb2
-rw-r--r--activerecord/lib/active_record/relation/query_methods.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/relation/calculations.rb b/activerecord/lib/active_record/relation/calculations.rb
index 40fe39fa9d..ad9ccfa215 100644
--- a/activerecord/lib/active_record/relation/calculations.rb
+++ b/activerecord/lib/active_record/relation/calculations.rb
@@ -190,7 +190,7 @@ module ActiveRecord
relation = apply_join_dependency
relation.pluck(*column_names)
else
- enforce_raw_sql_whitelist(column_names)
+ enforce_raw_sql_permit_list(column_names)
relation = spawn
relation.select_values = column_names.map { |cn|
@klass.has_attribute?(cn) || @klass.attribute_alias?(cn) ? arel_attribute(cn) : cn
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb
index 52405f21a1..4a6ffea3e7 100644
--- a/activerecord/lib/active_record/relation/query_methods.rb
+++ b/activerecord/lib/active_record/relation/query_methods.rb
@@ -1133,9 +1133,9 @@ module ActiveRecord
end
order_args.flatten!
- @klass.enforce_raw_sql_whitelist(
+ @klass.enforce_raw_sql_permit_list(
order_args.flat_map { |a| a.is_a?(Hash) ? a.keys : a },
- whitelist: AttributeMethods::ClassMethods::COLUMN_NAME_ORDER_WHITELIST
+ permit_list: AttributeMethods::ClassMethods::COLUMN_NAME_ORDER_PERMIT_LIST
)
validate_order_args(order_args)