aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/base.rb
diff options
context:
space:
mode:
authorNeeraj Singh <neerajdotname@gmail.com>2010-11-17 23:12:22 +0800
committerAaron Patterson <aaron.patterson@gmail.com>2010-11-18 07:49:45 +0800
commit9c1993bf6bdd0a3d2c46310c953631c1d5a7e3d1 (patch)
treed5aa125f941f75b332feda7941e17be307abb60e /activerecord/lib/active_record/base.rb
parentf978c4b2e44401260bbf4b5a954fda0b2bc71781 (diff)
downloadrails-9c1993bf6bdd0a3d2c46310c953631c1d5a7e3d1.tar.gz
rails-9c1993bf6bdd0a3d2c46310c953631c1d5a7e3d1.tar.bz2
rails-9c1993bf6bdd0a3d2c46310c953631c1d5a7e3d1.zip
replace and with && as per rails coding convention
Diffstat (limited to 'activerecord/lib/active_record/base.rb')
-rw-r--r--activerecord/lib/active_record/base.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index 60a9ca7464..314f676711 100644
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -1283,7 +1283,7 @@ MSG
# ["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)