paper_trail-rails 0.2.0 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changelog.md +3 -0
- data/lib/paper_trail/rails/configuration.rb +0 -7
- data/lib/paper_trail/rails/console.rb +8 -0
- data/lib/paper_trail/rails/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5bb565d9f1560cbced48f6e7267b0f5bfd71a126aab0abca1552593051ef778
|
4
|
+
data.tar.gz: bea208743f7f24e024fb31166235b37d494408a1147dc6adad860802d3208dc4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e82586b772678e3457ce068ac2aa54daab949702d4cddef94abbeae360eb57360cb8bc5fb5564d4196e4406cbdeabf05b2877e6260b3178117e0d0c79cf40f8d
|
7
|
+
data.tar.gz: d3f121829e868e56ec1d1efc19be968a631e64a3b5def419c7781b6a8a60c472e711a3769a0777b5e1b00751bfe388248f8c042a5fa398906a94e1c213d2fc2a
|
data/Changelog.md
CHANGED
@@ -6,9 +6,6 @@ module PaperTrail
|
|
6
6
|
|
7
7
|
config.select_user_filter = :itself
|
8
8
|
config.select_user_other_allowed_values = ['system', 'admin']
|
9
|
-
config.user_for_test = ->(users) {
|
10
|
-
users.admins.last
|
11
|
-
}
|
12
9
|
end
|
13
10
|
|
14
11
|
# Filter proc to use to show a list of users in select_user helper. For example:
|
@@ -19,10 +16,6 @@ module PaperTrail
|
|
19
16
|
attr_accessor :select_user_filter
|
20
17
|
|
21
18
|
attr_accessor :select_user_other_allowed_values
|
22
|
-
|
23
|
-
# A proc that returns a user if you ever run `rails console` in test
|
24
|
-
# environment (where you probably won't have any real data)
|
25
|
-
attr_accessor :user_for_test
|
26
19
|
end
|
27
20
|
end
|
28
21
|
end
|
@@ -18,6 +18,10 @@ module PaperTrail
|
|
18
18
|
config.ask_for_reason = true
|
19
19
|
config.require_reason = false
|
20
20
|
config.auto_reset_reason = true
|
21
|
+
|
22
|
+
config.user_for_test = ->(users) {
|
23
|
+
users.last
|
24
|
+
}
|
21
25
|
end
|
22
26
|
|
23
27
|
attr_accessor :ask_for_user
|
@@ -28,6 +32,10 @@ module PaperTrail
|
|
28
32
|
attr_accessor :require_reason
|
29
33
|
attr_accessor :auto_reset_reason
|
30
34
|
|
35
|
+
# A proc that returns a user if you ever run `rails console` in test
|
36
|
+
# environment (where you probably won't have any real data)
|
37
|
+
attr_accessor :user_for_test
|
38
|
+
|
31
39
|
class << self
|
32
40
|
def configure
|
33
41
|
yield self
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paper_trail-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tyler Rick
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: paper_trail
|
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
128
|
- !ruby/object:Gem::Version
|
129
129
|
version: '0'
|
130
130
|
requirements: []
|
131
|
-
rubygems_version: 3.0.
|
131
|
+
rubygems_version: 3.0.3
|
132
132
|
signing_key:
|
133
133
|
specification_version: 4
|
134
134
|
summary: Integrate with rails console and migrations. In rails console, ask who is
|