culturecode-track_changes 0.1.1 → 0.1.2

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: b6e3ca848bdacd4592637bd51cce7aee4e5a574e
4
- data.tar.gz: c9f521645c6476d4c530e38a82e2efcf3d16feda
3
+ metadata.gz: cfddea8f7f37242ef70cad9d17b2bbbea5d610a6
4
+ data.tar.gz: 250ab77746cd7991f5eabe04b71dffec39be896a
5
5
  SHA512:
6
- metadata.gz: 3260b8b1cded3f032c565f2a6962e9a3707148e58424c74d773941b75c9b412f3a58a148609fab65e3f2cfcb7a8ded36b69db986b5e72c5714c5748681b1c13e
7
- data.tar.gz: 6c31e97c86d94df0d956eeec6aa34bb976cf3bb03617d42b468791e7d15c160ccbb7a02b807ccd8e191c93cce8a028b75a7eeca6d06f24a29426d34f6e6cc86d
6
+ metadata.gz: 8f29bda1a82ad609e32868a3611be8ab996c52f496ff4b3150e64a46e6fbd0d6fc03d129b1bd4faae386b01a2e028154ac1e9922f1aa505c1c7ba83f1215d75c
7
+ data.tar.gz: 9da20ea1201d384476e2ab94d07cc577f1f419ec9dcd9a0190cf1074a861f168121f60c8e7a057a27f167f601e7fa01f5dc115848a19b6b1350911ba4d139cc3
data/README.md CHANGED
@@ -47,11 +47,11 @@ in the ```:changes_by column``` of the record. If given an instance of ActiveRec
47
47
  the record's id will be used.
48
48
 
49
49
  ```ruby
50
- # Inline attribution
50
+ # Model-level attribution
51
51
  person.save(:changes_by => 'Joe Changems')
52
52
 
53
53
  # Block-level attribution
54
- attribute_changes_to 'Joe Changems' do
54
+ TrackChanges.with_changes_attributed_to 'Joe Changems' do
55
55
  person.save
56
56
  end
57
57
 
@@ -4,5 +4,9 @@ require 'track_changes/attribution'
4
4
 
5
5
  module TrackChanges
6
6
  class Engine < ::Rails::Engine
7
+ config.to_prepare do
8
+ ActiveRecord::Base.send :extend, TrackChanges::Model::Base
9
+ ApplicationController.send :extend, TrackChanges::Controller::Base
10
+ end
7
11
  end
8
12
  end
@@ -1,3 +1,3 @@
1
1
  module TrackChanges
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: culturecode-track_changes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicholas Jakobsen, Ryan Wallace
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-24 00:00:00.000000000 Z
11
+ date: 2015-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -52,8 +52,6 @@ files:
52
52
  - app/helpers/track_changes/diff_helper.rb
53
53
  - app/models/track_changes/diff.rb
54
54
  - app/models/track_changes/snapshot.rb
55
- - config/initializers/extend_activerecord.rb
56
- - config/initializers/extend_application_controller.rb
57
55
  - config/routes.rb
58
56
  - lib/tasks/track_changes_tasks.rake
59
57
  - lib/track_changes.rb
@@ -82,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
80
  version: '0'
83
81
  requirements: []
84
82
  rubyforge_project:
85
- rubygems_version: 2.4.7
83
+ rubygems_version: 2.4.6
86
84
  signing_key:
87
85
  specification_version: 4
88
86
  summary: Easily track changes to various ActiveRecord models
@@ -1 +0,0 @@
1
- ActiveRecord::Base.send :extend, TrackChanges::Model::Base
@@ -1 +0,0 @@
1
- ApplicationController.send :extend, TrackChanges::Controller::Base