summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-06-13 11:10:22 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-06-13 11:10:22 +0000
commit06b7d48dba4b51e88cdb30d393c7e9f5cef68114 (patch)
tree20728470f9e56545dbf0017b2d42dc0f4b0a115d
parente4dcb888c559c57822c6cd883b13f1a1157c75de (diff)
downloadredmine-06b7d48dba4b51e88cdb30d393c7e9f5cef68114.tar.gz
redmine-06b7d48dba4b51e88cdb30d393c7e9f5cef68114.zip
Merged r14294 (#19957).
git-svn-id: http://svn.redmine.org/redmine/branches/3.0-stable@14306 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--lib/plugins/acts_as_versioned/lib/acts_as_versioned.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/plugins/acts_as_versioned/lib/acts_as_versioned.rb b/lib/plugins/acts_as_versioned/lib/acts_as_versioned.rb
index 618cf07c5..adb9fed86 100644
--- a/lib/plugins/acts_as_versioned/lib/acts_as_versioned.rb
+++ b/lib/plugins/acts_as_versioned/lib/acts_as_versioned.rb
@@ -447,7 +447,7 @@ module ActiveRecord #:nodoc:
def write_changed_attribute(attr_name, attr_value)
# Convert to db type for comparison. Avoids failing Float<=>String comparisons.
- attr_value_for_db = self.class.columns_hash[attr_name.to_s].type_cast(attr_value)
+ attr_value_for_db = self.class.columns_hash[attr_name.to_s].type_cast_from_database(attr_value)
(self.altered_attributes ||= []) << attr_name.to_s unless self.changed?(attr_name) || self.send(attr_name) == attr_value_for_db
write_attribute(attr_name, attr_value_for_db)
end