##// END OF EJS Templates
acts_as_versioned not compatible with ActiveRecord 4.2.1 (#19957)....
Jean-Philippe Lang -
r13912:ea34967e65b2
parent child
Show More
@@ -447,7 +447,7 module ActiveRecord #:nodoc:
447
447
448 def write_changed_attribute(attr_name, attr_value)
448 def write_changed_attribute(attr_name, attr_value)
449 # Convert to db type for comparison. Avoids failing Float<=>String comparisons.
449 # Convert to db type for comparison. Avoids failing Float<=>String comparisons.
450 attr_value_for_db = self.class.columns_hash[attr_name.to_s].type_cast(attr_value)
450 attr_value_for_db = self.class.columns_hash[attr_name.to_s].type_cast_from_database(attr_value)
451 (self.altered_attributes ||= []) << attr_name.to_s unless self.changed?(attr_name) || self.send(attr_name) == attr_value_for_db
451 (self.altered_attributes ||= []) << attr_name.to_s unless self.changed?(attr_name) || self.send(attr_name) == attr_value_for_db
452 write_attribute(attr_name, attr_value_for_db)
452 write_attribute(attr_name, attr_value_for_db)
453 end
453 end
General Comments 0
You need to be logged in to leave comments. Login now