lib/acts_as_versioned.rb
# Reverts a model to a given version and saves the model.
# Takes either a version number or an instance of the versioned model
# Optionally takes parameter to indicate whether all newer versions
# (after the version being reverted to) should be deleted.
Reverts a model to a given version and saves the model.
Takes either a version number or an instance of the versioned model
Optionally takes parameter to indicate whether all newer versions
(after the version being reverted to) should be deleted.
Reverts a model to a given version and saves the model . Takes either a version number or an instance of the versioned model Optionally takes parameter to indicate whether all newer versions ( after the version being reverted to ) should be deleted .
def revert_to!(version, remove_newer_versions = false)
          result = revert_to(version) ? save_without_revision : false
          delete_newer_versions if (result && remove_newer_versions)
          result
        end
def revert_to! ( version , remove_newer_versions = false ) result = revert_to ( version ) ? save_without_revision : false delete_newer_versions if ( result && remove_newer_versions ) result end
Reverts a model to a given version and saves the model.
Reverts a model to a given version and saves the model .
version
remove_newer_versions