Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #7623 from tchandy/master

update ConnectionAdapter::Column#type_cast_code to be compatible with rails 3.2 branch
  • Loading branch information...
commit c4b857299b3322572b006d825bb9dc9912101e99 2 parents 9641cdd + d4b3fdb
@rafaelfranca rafaelfranca authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  activerecord/lib/active_record/connection_adapters/column.rb
View
2  activerecord/lib/active_record/connection_adapters/column.rb
@@ -114,7 +114,7 @@ def type_cast_code(var_name)
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})"
Please sign in to comment.
Something went wrong with that request. Please try again.