]> source.dussan.org Git - redmine.git/commitdiff
Fixed that WikiContent#next_version raises a comparison of Symbol with Arel::Table...
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 14 Oct 2013 17:07:17 +0000 (17:07 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 14 Oct 2013 17:07:17 +0000 (17:07 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12222 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/plugins/acts_as_versioned/lib/acts_as_versioned.rb

index b63c891e40831cfa993a1a1885aad501f61d00f1..618cf07c535417edc98a1ccd471e08d56e1230db 100644 (file)
@@ -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.