Module VestalVersions::Conditions::ClassMethods
In: lib/vestal_versions/conditions.rb

Class methods on ActiveRecord::Base to prepare the :if and :unless options.

Methods

Public Instance methods

After the original prepare_versioned_options method cleans the given options, this alias also extracts the :if and :unless options, chaning them into arrays and converting any symbols to procs. Procs are called with the ActiveRecord model instance as the sole argument.

If all of the :if conditions are met and none of the :unless conditions are unmet, than version creation will proceed, assuming all other conditions are also met.

[Validate]