Skip to content
Browse files

replace and with && as per rails coding convention

  • Loading branch information...
1 parent f978c4b commit 9c1993bf6bdd0a3d2c46310c953631c1d5a7e3d1 Neeraj Singh committed with tenderlove Nov 17, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/base.rb
View
2 activerecord/lib/active_record/base.rb
@@ -1283,7 +1283,7 @@ def sanitize_sql_hash_for_assignment(attrs)
# ["name='%s' and group_id='%s'", "foo'bar", 4] returns "name='foo''bar' and group_id='4'"
def sanitize_sql_array(ary)
statement, *values = ary
- if values.first.is_a?(Hash) and statement =~ /:\w+/
+ if values.first.is_a?(Hash) && statement =~ /:\w+/
replace_named_bind_variables(statement, values.first)
elsif statement.include?('?')
replace_bind_variables(statement, values)

0 comments on commit 9c1993b

Please sign in to comment.
Something went wrong with that request. Please try again.