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
This commit is contained in:
parent
699317e12e
commit
758cc2f2e6
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue