aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorThiago Pradi <thiago.pradi@gmail.com>2012-09-13 00:26:52 -0300
committerThiago Pradi <thiago.pradi@gmail.com>2012-09-13 00:26:52 -0300
commitd4b3fdb00314857ee0b402d880d3b0d1c18e5989 (patch)
treeddf29c32b4f3231b771b8fe1bfeecbaa55781294 /activerecord
parent9641cdd88478fa5369def216de0718c3fb139f92 (diff)
downloadrails-d4b3fdb00314857ee0b402d880d3b0d1c18e5989.tar.gz
rails-d4b3fdb00314857ee0b402d880d3b0d1c18e5989.tar.bz2
rails-d4b3fdb00314857ee0b402d880d3b0d1c18e5989.zip
update ConnectionAdaptar::Column#type_cast_code to be compatible with 3.2 branch
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/connection_adapters/column.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/column.rb b/activerecord/lib/active_record/connection_adapters/column.rb
index 0390168461..816b5e17c1 100644
--- a/activerecord/lib/active_record/connection_adapters/column.rb
+++ b/activerecord/lib/active_record/connection_adapters/column.rb
@@ -114,7 +114,7 @@ module ActiveRecord
case type
when :string, :text then var_name
- when :integer then "(#{var_name}.to_i rescue #{var_name} ? 1 : 0)"
+ when :integer then "(#{var_name}.to_i)"
when :float then "#{var_name}.to_f"
when :decimal then "#{klass}.value_to_decimal(#{var_name})"
when :datetime, :timestamp then "#{klass}.string_to_time(#{var_name})"