diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-12 11:48:41 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-12 11:48:41 -0700 |
commit | 9852a724177cb5f65d5b37c0511cfacea2a3ebb6 (patch) | |
tree | 33968f55ca9bcc77db905701a6b4f2619ae80985 /activerecord/lib | |
parent | c882154cd121ea494019afa0c9ce8d31767de691 (diff) | |
download | rails-9852a724177cb5f65d5b37c0511cfacea2a3ebb6.tar.gz rails-9852a724177cb5f65d5b37c0511cfacea2a3ebb6.tar.bz2 rails-9852a724177cb5f65d5b37c0511cfacea2a3ebb6.zip |
removing intermediate variables
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/quoting.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb b/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb index 820c6d9f0c..603e4de564 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb @@ -17,8 +17,7 @@ module ActiveRecord if column.type == :binary && column.class.respond_to?(:string_to_binary) "'#{quote_string(column.class.string_to_binary(value))}'" # ' (for ruby-mode) elsif [:integer, :float].include?(column.type) - value = column.type == :integer ? value.to_i : value.to_f - value.to_s + (column.type == :integer ? value.to_i : value.to_f).to_s else "'#{quote_string(value)}'" # ' (for ruby-mode) end |