diff --git a/lib/miq_expression.rb b/lib/miq_expression.rb index 9c58ca11738f..66e99d064f3b 100644 --- a/lib/miq_expression.rb +++ b/lib/miq_expression.rb @@ -1448,7 +1448,7 @@ def extract_where_values(klass, scope) arel = relation.arel binds = relation.bound_attributes - binds = connection.prepare_binds_for_database(binds) + binds = binds.collect(&:value_for_database) binds.map! { |value| connection.quote(value) } collect = visitor.accept(arel.ast, Arel::Collectors::Bind.new) collect.substitute_binds(binds).join