From cf87d9d7836fcf602698fbf0b125ee6ab895d65c Mon Sep 17 00:00:00 2001 From: Brian Lopez Date: Thu, 13 May 2010 00:18:21 -0700 Subject: [PATCH] fix typo --- lib/active_record/connection_adapters/mysql2_adapter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/active_record/connection_adapters/mysql2_adapter.rb b/lib/active_record/connection_adapters/mysql2_adapter.rb index c972473..e659fc2 100644 --- a/lib/active_record/connection_adapters/mysql2_adapter.rb +++ b/lib/active_record/connection_adapters/mysql2_adapter.rb @@ -70,7 +70,7 @@ module ActiveRecord case type when :string then nil when :text then nil - when :integer then "#{var_name}.to_i rescue value ? 1 : 0)" + when :integer then "#{var_name}.to_i rescue value ? 1 : 0" when :float then "#{var_name}.to_f" when :decimal then "#{self.class.name}.value_to_decimal(#{var_name})" when :datetime, :timestamp then "#{var_name}.class == Time ? #{var_name} : #{self.class.name}.string_to_time(#{var_name})"