Module | VestalVersions::Configuration |
In: |
lib/vestal_versions/configuration.rb
|
Allows for easy application-wide configuration of options passed into the versioned method.
The VestalVersions module is extended by VestalVersions::Configuration, allowing the +configure method+ to be used as follows in a Rails initializer:
VestalVersions.configure do |config| config.class_name = "MyCustomVersion" config.dependent = :destroy end
Each variable assignment in the configure block corresponds directly with the options available to the versioned method. Assigning common options in an initializer can keep your models tidy.
If an option is given in both an initializer and in the options passed to versioned, the value given in the model itself will take precedence.