Skip to content

Commit

Permalink
Fix CI failure when prepared_statements: false
Browse files Browse the repository at this point in the history
`PartialQuery#sql_for` when `prepared_statements: false` still raise
`RangeError`.
  • Loading branch information
kamipo committed Jun 24, 2020
1 parent 0601a9f commit d313892
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions activerecord/lib/active_record/statement_cache.rb
Expand Up @@ -148,6 +148,8 @@ def execute(params, connection, &block)
sql = query_builder.sql_for bind_values, connection

klass.find_by_sql(sql, bind_values, preparable: true, &block)
rescue ::RangeError
[]
end

def self.unsupported_value?(value)
Expand Down

0 comments on commit d313892

Please sign in to comment.