Permalink
Browse files

Don't interpolate a blank string, avoid warnings

  • Loading branch information...
1 parent 6aa1253 commit 963c71edfaed3c9942caa3027b2397dd9c403f26 @spastorino spastorino committed with tenderlove Jul 25, 2010
Showing with 2 additions and 0 deletions.
  1. +2 −0 activerecord/lib/active_record/base.rb
@@ -1255,6 +1255,8 @@ def sanitize_sql_array(ary)
replace_named_bind_variables(statement, values.first)
elsif statement.include?('?')
replace_bind_variables(statement, values)
+ elsif statement.blank?
+ statement
else
statement % values.collect { |value| connection.quote_string(value.to_s) }
end

0 comments on commit 963c71e

Please sign in to comment.