summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/plugins/acts_as_versioned/lib/acts_as_versioned.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/plugins/acts_as_versioned/lib/acts_as_versioned.rb b/lib/plugins/acts_as_versioned/lib/acts_as_versioned.rb
index b63c891e4..618cf07c5 100644
--- a/lib/plugins/acts_as_versioned/lib/acts_as_versioned.rb
+++ b/lib/plugins/acts_as_versioned/lib/acts_as_versioned.rb
@@ -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.