summaryrefslogtreecommitdiffstats
path: root/lib/plugins
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-05-31 07:19:33 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-05-31 07:19:33 +0000
commitea34967e65b24e7a813854905f13130e7195c236 (patch)
tree1c72bd12eaef882db3772a892d01751205b277e5 /lib/plugins
parented9f00178c65cc4b37ad2ab56cc89b1c79c4fb8b (diff)
downloadredmine-ea34967e65b24e7a813854905f13130e7195c236.tar.gz
redmine-ea34967e65b24e7a813854905f13130e7195c236.zip
acts_as_versioned not compatible with ActiveRecord 4.2.1 (#19957).
git-svn-id: http://svn.redmine.org/redmine/trunk@14294 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/plugins')
-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