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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NjY5Y2NmOGNlNzgxNjY2NWExOTMyMTNkNmMzYjY3OTQxYmVmMGVlNw==
4
+ ODVjM2I0MTUxOTZjM2FiNTUwNGNkNDU2ZjUyNDg5M2Y3MmM3YTMzZQ==
5
5
  data.tar.gz: !binary |-
6
- YWJkNWVkYWFjZGRjZWY4MTNhM2E5YWNjYzhmZjQ1NTYxZGIyNTg5Yg==
6
+ ZTRlMDEwMDBhNmYyZGQ5MmE2OTI3MTVkOTdhYmNkY2YyMWZkODdkYg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MmMyNjYzZjQ2OTUzZThiY2MyOGE2ZWZmZmQwYmE2N2UyYTVjOTJhMGY3MWRh
10
- YTlkYWU0YTk2ODU4ZjM4YzNkNGQzZGU5MzkxZjY2OWExNDYzNzY0NmJhZTAy
11
- ZWY2N2UzYzliNDM0MzdjNjBhMzY5YmU2NmI0YzFlNjJkMDRlMGY=
9
+ YWM1NjE2OGQwMjlkNDkyNmRjZTljOTQ5N2IyOTdlNTFjMjM3YjA2MThkNjg1
10
+ NjUxYmNiNTYzY2M3NmViMGYxNjk2NDZhNjJhMTBkZTBiZmE4ZWU5NGVmNjIx
11
+ NGJhZjFjYjNhZWI4MjBhYjg4ZWE2M2Y5Nzk0NjdlMTk2NzMxNTQ=
12
12
  data.tar.gz: !binary |-
13
- ODNjZWRlNzcxZWRlY2U3MDJhNzJmZTQ4Y2U1MGU1YTUyMjQ3NmEzZTk1MGEw
14
- ZTUyN2ViY2VhNTViZTE0OTBhZTRiNDAyMDdmYzlmNDQzY2VjNTdiNjhhMjVh
15
- YTNlMTZmNjBiNjM1NDA5NmZlNGIwODE4MjNiODg2NTUzMWYxYzE=
13
+ NWQzMjJmZDkzZTJmZWQxMWY0MmY5NDBjNmRjMTI0ZTBlMTBiNzUzODRjMWM0
14
+ YmRmNTk1ZTY1NWNhNWI0ZWY4MDVhODE5YzBiMjJlYTYxZjNhZDU4NTc2ZmRm
15
+ MTdhM2FiNDFjOGFmN2ExOTc4NTk0ZDc3NDg4MGVlMmIzYTgyYjY=
checksums.yaml.gz.sig CHANGED
Binary file
@@ -1,3 +1,3 @@
1
1
  module Historyable
2
- VERSION = "0.0.2"
2
+ VERSION = "0.1.0"
3
3
  end
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
- # raw_attribute_history
39
+ # attribute_history_raw
40
40
  #
41
41
  # @return [ActiveRecord::Relation]
42
- define_method("raw_#{historyable.attribute.to_s}_history") do
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("raw_#{historyable.attribute}_history")
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
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: historyable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Philippe Dionne
metadata.gz.sig CHANGED
Binary file