Browse Source

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
tags/2.4.0
Jean-Philippe Lang 10 years ago
parent
commit
758cc2f2e6
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      lib/plugins/acts_as_versioned/lib/acts_as_versioned.rb

+ 1
- 1
lib/plugins/acts_as_versioned/lib/acts_as_versioned.rb View 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.

Loading…
Cancel
Save