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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9d19c8a3b3761a1629700f15c81e88b4158fd65e
4
- data.tar.gz: 021dc5d964d3577811f29a52617993a71198c143
3
+ metadata.gz: 857ff2e75b4bc660107fe576972a04d4e0e408cf
4
+ data.tar.gz: 2b9b5c5130b9e6ac7c823c87cfbe7789a86578bf
5
5
  SHA512:
6
- metadata.gz: 560a5941478c2512c334128e8f9a6f838d3b5cae3720784bd36a4cffe1591a277c62ec3e66c9d70f9bf726066b315f739fbde46ef9d96ee6b2ff9da3355a368f
7
- data.tar.gz: 545ed05264a6b7d06bcf842b3e9d160d02cbf6cb5cfd2299cbad64404e84a569436e6e94d4fbe6b74de1e56ee9a35a2ddcb72fa9a1e904bfcdd925ef12c6b92d
6
+ metadata.gz: 7b57340d5e8f7def367efeefe10040c94e57950ba149f4946f628aaef6cadfb4f1658e8a4e77545d56244ff5496bda1f3814b03b0096984452f5bc2327915baf
7
+ data.tar.gz: b49e70ee42279c527e50e5134f4432297d3b1e9c526da18d240b9c65e6955379af26beafd9f34893dc7fdc63fbdd14b6659894eb39351e79ad63423f5f9bf3f0
data/README.md CHANGED
@@ -22,7 +22,7 @@ Or install it yourself as:
22
22
 
23
23
  Once installed, generate the necessary files and run migrations:
24
24
 
25
- $ rails generate active_versioning
25
+ $ rails generate active_versioning:install
26
26
  $ bundle exec rake db:migrate
27
27
 
28
28
  ## Setup
@@ -1,3 +1,3 @@
1
1
  module ActiveVersioning
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_versioning
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Stenberg