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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cfddea8f7f37242ef70cad9d17b2bbbea5d610a6
|
4
|
+
data.tar.gz: 250ab77746cd7991f5eabe04b71dffec39be896a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
#
|
50
|
+
# Model-level attribution
|
51
51
|
person.save(:changes_by => 'Joe Changems')
|
52
52
|
|
53
53
|
# Block-level attribution
|
54
|
-
|
54
|
+
TrackChanges.with_changes_attributed_to 'Joe Changems' do
|
55
55
|
person.save
|
56
56
|
end
|
57
57
|
|
data/lib/track_changes/engine.rb
CHANGED
@@ -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
|
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.
|
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-
|
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.
|
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
|