@@ -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. |
|
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