mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
always allow Arel::Attributes::Attribute also
This commit is contained in:
parent
6532802591
commit
40d302d880
1 changed files with 3 additions and 1 deletions
|
@ -170,7 +170,9 @@ module ActiveRecord
|
|||
def enforce_raw_sql_whitelist(args, whitelist: attribute_names_and_aliases) # :nodoc:
|
||||
unexpected = args.reject do |arg|
|
||||
whitelist.include?(arg.to_s) ||
|
||||
arg.kind_of?(Arel::Node) || arg.is_a?(Arel::Nodes::SqlLiteral)
|
||||
arg.kind_of?(Arel::Node) ||
|
||||
arg.is_a?(Arel::Nodes::SqlLiteral) ||
|
||||
arg.is_a?(Arel::Attributes::Attribute)
|
||||
end
|
||||
|
||||
return if unexpected.none?
|
||||
|
|
Loading…
Reference in a new issue