property_sets 3.5.4 → 3.5.5

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
  SHA256:
3
- metadata.gz: f4e1af4d793c11242f869c3c17e1d25044d301623d1a2f37570c522df9b3b2cf
4
- data.tar.gz: 6001e124fb8cded395d58d07176a7ff39c14ce8c02e4f97b57a109f3bda0074b
3
+ metadata.gz: 7ec20448b7611d9a88bad99dd6054acb756b53b4a1245566140c1c69d9fddf83
4
+ data.tar.gz: 2f1f2ba401def86c3c0b417002c02f7242b44150d4f98ee329b0d0cc816d0030
5
5
  SHA512:
6
- metadata.gz: 91a32d9e89753106a977eb19637ca509b821e8630dcfbd882ef9ac648c6c9043f3dfab4feeb25fe192a946072940efaecf26a50cf014b8fec9ddd6d03ab81ef9
7
- data.tar.gz: f498e7fab65d9fa4abbcbdce0ea16fe6051ea1d07d41504de521243d032cca7f75ca53c1f51550001fee2a27db43612c9d4869d1a6d86bbb46b18af88b28d805
6
+ metadata.gz: 9da8220c3444cd8f71daafa64172bffcd17efb0f7b60b98ced8f4e8a5193ad7defbcbb8e13be1c914fc01c756c4f147316fe42af833e9edd85eb80032ff86144
7
+ data.tar.gz: 1e70f7eb188f60600ff770b5b0034e43de5575b471b88194b6c736d3eeabe13319c1281e65c6512ab12958e0c31079f4961fe0d1b976666ceccc12a1bbdbfd3b
@@ -20,7 +20,10 @@ module PropertySets
20
20
  def delegate_to_property_set(setname, mappings)
21
21
  raise "Second argument must be a Hash" unless mappings.is_a?(Hash)
22
22
 
23
- @delegated_property_set_attributes ||= []
23
+ unless respond_to?(:delegated_property_set_attributes)
24
+ class_attribute :delegated_property_set_attributes
25
+ end
26
+ self.delegated_property_set_attributes ||= []
24
27
 
25
28
  mappings.each do |old_attr, new_attr|
26
29
  self.delegated_property_set_attributes << old_attr.to_s
@@ -60,13 +63,9 @@ module PropertySets
60
63
  # These are not database columns and should not be included in queries but
61
64
  # using the attributes API is the only way to track changes in the main model
62
65
  if respond_to?(:user_provided_columns)
63
- self.user_provided_columns.reject!{|k,_| @delegated_property_set_attributes.include?(k.to_s) }
66
+ self.user_provided_columns.reject!{|k,_| delegated_property_set_attributes.include?(k.to_s) }
64
67
  end
65
68
  end
66
-
67
- def delegated_property_set_attributes
68
- @delegated_property_set_attributes
69
- end
70
69
  end
71
70
  end
72
71
  end
@@ -1,3 +1,3 @@
1
1
  module PropertySets
2
- VERSION = "3.5.4"
2
+ VERSION = "3.5.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: property_sets
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.4
4
+ version: 3.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Morten Primdahl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-07 00:00:00.000000000 Z
11
+ date: 2020-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord