Module: Mongoid::Versioning::ClassMethods

Defined in:
lib/mongoid/versioning.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#max_versions(number) ⇒ Integer

Sets the maximum number of versions to store.

Examples:

Set the maximum.

Person.max_versions(5)

Parameters:

  • number (Integer)

    The maximum number to store.

Returns:

  • (Integer)

    The max number of versions.



193
194
195
# File 'lib/mongoid/versioning.rb', line 193

def max_versions(number)
  self.version_max = number.to_i
end