active_versioning 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/active_versioning/version.rb +1 -1
- data/lib/active_versioning.rb +10 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 857ff2e75b4bc660107fe576972a04d4e0e408cf
|
4
|
+
data.tar.gz: 2b9b5c5130b9e6ac7c823c87cfbe7789a86578bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b57340d5e8f7def367efeefe10040c94e57950ba149f4946f628aaef6cadfb4f1658e8a4e77545d56244ff5496bda1f3814b03b0096984452f5bc2327915baf
|
7
|
+
data.tar.gz: b49e70ee42279c527e50e5134f4432297d3b1e9c526da18d240b9c65e6955379af26beafd9f34893dc7fdc63fbdd14b6659894eb39351e79ad63423f5f9bf3f0
|
data/README.md
CHANGED
data/lib/active_versioning.rb
CHANGED
@@ -6,4 +6,14 @@ module ActiveVersioning
|
|
6
6
|
autoload :Events, 'active_versioning/events'
|
7
7
|
autoload :Model, 'active_versioning/model'
|
8
8
|
autoload :VersionManager, 'active_versioning/version_manager'
|
9
|
+
|
10
|
+
def self.versioned_models
|
11
|
+
@@versioned_models ||= begin
|
12
|
+
Rails.application.eager_load! unless Rails.application.config.eager_load
|
13
|
+
|
14
|
+
ActiveRecord::Base.descendants.select do |model|
|
15
|
+
model.included_modules.include? Model::Versioned
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
9
19
|
end
|