##// END OF EJS Templates
Fixed that WikiContent#next_version raises a comparison of Symbol with Arel::Table failed error (#14773)....
Jean-Philippe Lang -
r11992:758cc2f2e6ed
parent child
Show More
@@ -437,7 +437,7 module ActiveRecord #:nodoc:
437 # Gets the next available version for the current record, or 1 for a new record
437 # Gets the next available version for the current record, or 1 for a new record
438 def next_version
438 def next_version
439 return 1 if new_record?
439 return 1 if new_record?
440 (versions.calculate(:max, :version) || 0) + 1
440 (versions.maximum('version') || 0) + 1
441 end
441 end
442
442
443 # clears current changed attributes. Called after save.
443 # clears current changed attributes. Called after save.
General Comments 0
You need to be logged in to leave comments. Login now