From 9852a724177cb5f65d5b37c0511cfacea2a3ebb6 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 12 Oct 2010 11:48:41 -0700 Subject: removing intermediate variables --- activerecord/lib/active_record/connection_adapters/abstract/quoting.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'activerecord/lib') 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 -- cgit v1.2.3