footprintable 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/footprintable/instance_methods.rb +6 -6
- data/lib/footprintable/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44a8fd537abefb919090760b049fa04af6e0863cb5cb7f1419d2d8d314e62d03
|
4
|
+
data.tar.gz: 7ad3ca6f47589aad4d54b01d2200c8f1d868b0c6f51426dc7ececef1fbc82565
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36a4b81c49ef5f69a3420dba7061c840595ee434b7dee2629cf0cd0e1b7140deecb6691603a67aacf5d9f5b8b1dc2dd1b613325f17bd125ae489d3439a1e410f
|
7
|
+
data.tar.gz: d1728227d60c6c924951914976eda2d1997039867f7c247c41ce8a5e4d174b27c45e33c27f573f168f862fd412d1238c3aa052c96107fdf431563b1ea7042dc7
|
@@ -2,14 +2,14 @@ require 'footprintable/current'
|
|
2
2
|
module Footprintable
|
3
3
|
module InstanceMethods
|
4
4
|
def create_footprint action
|
5
|
-
|
6
|
-
return if attrs_changed.empty?
|
7
|
-
attrs_changed = attrs_changed.except *self.class.footprint_options[:except]
|
8
|
-
attrs_changed = attrs_changed.extract! *self.class.footprint_options[:extract] if self.class.footprint_options[:extract].present?
|
9
|
-
|
10
|
-
if action === :destroy
|
5
|
+
if action == :destroy
|
11
6
|
self.footprints.model.new(before: self, after: {}, action: action, trackable: self, actorable: Current.actor).save(validate: false)
|
12
7
|
else
|
8
|
+
attrs_changed = previous_changes
|
9
|
+
attrs_changed = attrs_changed.except *self.class.footprint_options[:except]
|
10
|
+
attrs_changed = attrs_changed.extract! *self.class.footprint_options[:extract] if self.class.footprint_options[:extract].present?
|
11
|
+
return if attrs_changed.empty?
|
12
|
+
|
13
13
|
attrs_before = {}
|
14
14
|
attrs_after = {}
|
15
15
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: footprintable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sanmu
|
@@ -73,7 +73,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '0'
|
75
75
|
requirements: []
|
76
|
-
|
76
|
+
rubyforge_project:
|
77
|
+
rubygems_version: 2.7.6.2
|
77
78
|
signing_key:
|
78
79
|
specification_version: 4
|
79
80
|
summary: track model column change.
|