historyable 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- checksums.yaml.gz.sig +0 -0
- data/lib/historyable/version.rb +1 -1
- data/lib/historyable.rb +3 -3
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ODVjM2I0MTUxOTZjM2FiNTUwNGNkNDU2ZjUyNDg5M2Y3MmM3YTMzZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZTRlMDEwMDBhNmYyZGQ5MmE2OTI3MTVkOTdhYmNkY2YyMWZkODdkYg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YWM1NjE2OGQwMjlkNDkyNmRjZTljOTQ5N2IyOTdlNTFjMjM3YjA2MThkNjg1
|
10
|
+
NjUxYmNiNTYzY2M3NmViMGYxNjk2NDZhNjJhMTBkZTBiZmE4ZWU5NGVmNjIx
|
11
|
+
NGJhZjFjYjNhZWI4MjBhYjg4ZWE2M2Y5Nzk0NjdlMTk2NzMxNTQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NWQzMjJmZDkzZTJmZWQxMWY0MmY5NDBjNmRjMTI0ZTBlMTBiNzUzODRjMWM0
|
14
|
+
YmRmNTk1ZTY1NWNhNWI0ZWY4MDVhODE5YzBiMjJlYTYxZjNhZDU4NTc2ZmRm
|
15
|
+
MTdhM2FiNDFjOGFmN2ExOTc4NTk0ZDc3NDg4MGVlMmIzYTgyYjY=
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/historyable/version.rb
CHANGED
data/lib/historyable.rb
CHANGED
@@ -36,10 +36,10 @@ module Historyable
|
|
36
36
|
# Instance methods
|
37
37
|
historyable_items.each do |historyable|
|
38
38
|
|
39
|
-
#
|
39
|
+
# attribute_history_raw
|
40
40
|
#
|
41
41
|
# @return [ActiveRecord::Relation]
|
42
|
-
define_method("
|
42
|
+
define_method("#{historyable.attribute.to_s}_history_raw") do
|
43
43
|
send(historyable.association_name)
|
44
44
|
.where(object_attribute: historyable.attribute)
|
45
45
|
.order('created_at DESC')
|
@@ -54,7 +54,7 @@ module Historyable
|
|
54
54
|
unless instance_variable_get("@#{historyable.attribute.to_s}_history".to_sym)
|
55
55
|
array = []
|
56
56
|
|
57
|
-
records = send("
|
57
|
+
records = send("#{historyable.attribute}_history_raw")
|
58
58
|
.pluck(:object_attribute_value, :created_at)
|
59
59
|
records.map do |attribute_value, created_at|
|
60
60
|
hash = HashWithIndifferentAccess.new
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|