diff options
Diffstat (limited to 'activerecord/lib/active_record')
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 697e7a0c41..183aae280f 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -1241,7 +1241,7 @@ module ActiveRecord #:nodoc: # Updates the attribute identified by <tt>attr_name</tt> with the specified +value+. Empty strings for fixnum and float # columns are turned into nil. def write_attribute(attr_name, value) - @attributes[attr_name] = empty_string_for_number_column?(attr_name, value) ? nil : value + @attributes[attr_name.to_s] = empty_string_for_number_column?(attr_name.to_s, value) ? nil : value end def empty_string_for_number_column?(attr_name, value) |