summaryrefslogtreecommitdiffstats
path: root/lib/plugins
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-10-14 17:07:17 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-10-14 17:07:17 +0000
commit758cc2f2e6eda211d6e38c467ce56532a2e23600 (patch)
treedaf91c5560330846e125dfb62a4768f856a239cc /lib/plugins
parent699317e12e7f2405d03c99c864de79a8bcf77bfd (diff)
downloadredmine-758cc2f2e6eda211d6e38c467ce56532a2e23600.tar.gz
redmine-758cc2f2e6eda211d6e38c467ce56532a2e23600.zip
Fixed that WikiContent#next_version raises a comparison of Symbol with Arel::Table failed error (#14773).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12222 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 b63c891e4..618cf07c5 100644
--- a/lib/plugins/acts_as_versioned/lib/acts_as_versioned.rb
+++ b/lib/plugins/acts_as_versioned/lib/acts_as_versioned.rb
@@ -437,7 +437,7 @@ module ActiveRecord #:nodoc:
# Gets the next available version for the current record, or 1 for a new record
def next_version
return 1 if new_record?
- (versions.calculate(:max, :version) || 0) + 1
+ (versions.maximum('version') || 0) + 1
end
# clears current changed attributes. Called after save.