diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-26 13:02:14 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-26 13:44:11 -0700 |
commit | e73b0b84d939af241dfbba8931d8add9724595e4 (patch) | |
tree | 39fa3b203de14130f8579bca1f7989d2a693f6fa /activerecord/lib/active_record/connection_adapters/mysql_adapter.rb | |
parent | 104d0b263e5d9b17216f06c72d422d26ca5a537f (diff) | |
download | rails-e73b0b84d939af241dfbba8931d8add9724595e4.tar.gz rails-e73b0b84d939af241dfbba8931d8add9724595e4.tar.bz2 rails-e73b0b84d939af241dfbba8931d8add9724595e4.zip |
renaming bind_values to binds where it makes sense
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/mysql_adapter.rb')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/mysql_adapter.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb index 36817fcbfd..7d47d06ae1 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb @@ -326,12 +326,12 @@ module ActiveRecord @statements.clear end - def exec(sql, name = 'SQL', bind_values = []) + def exec(sql, name = 'SQL', binds = []) log(sql, name) do result = nil cache = {} - if bind_values.empty? + if binds.empty? stmt = @connection.prepare(sql) else cache = @statements[sql] ||= { @@ -340,7 +340,7 @@ module ActiveRecord stmt = cache[:stmt] end - stmt.execute(*bind_values.map { |col, val| + stmt.execute(*binds.map { |col, val| col ? col.type_cast(val) : val }) if metadata = stmt.result_metadata @@ -353,7 +353,7 @@ module ActiveRecord end stmt.free_result - stmt.close if bind_values.empty? + stmt.close if binds.empty? result end |