Module: ActiveVersioning

Defined in:
lib/active_versioning.rb,
lib/active_versioning/model.rb,
lib/active_versioning/errors.rb,
lib/active_versioning/events.rb,
lib/active_versioning/version.rb,
lib/active_versioning/model/versioned.rb,
lib/active_versioning/version_manager.rb,
lib/active_versioning/model/version_proxy.rb,
lib/active_versioning/errors/incompatible_version.rb,
lib/generators/active_versioning/install_generator.rb

Defined Under Namespace

Modules: Errors, Events, Model Classes: InstallGenerator, VersionManager

Constant Summary collapse

VERSION =
"1.2.0"

Class Method Summary collapse

Class Method Details

.versioned_modelsObject



11
12
13
14
15
16
17
18
19
# File 'lib/active_versioning.rb', line 11

def self.versioned_models
  @@versioned_models ||= begin
    Rails.application.eager_load!

    ActiveRecord::Base.descendants.select do |model|
      model.included_modules.include? Model::Versioned
    end
  end
end