Skip to content

Commit

Permalink
Rails 5.0/5.1 prepare_binds_for_database is gone
Browse files Browse the repository at this point in the history
To avoid relying on the connection to type cast the binds, this method was
removed.  It was replaced with the underlying implementation of the
method, which is also used here to replace our usage.

rails/rails@5465508
  • Loading branch information
jrafanie committed Oct 10, 2018
1 parent 803bfda commit 9bf9dc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/miq_expression.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9bf9dc2

Please sign in to comment.