associationist 0.1.3 → 0.1.4

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
  SHA1:
3
- metadata.gz: aead1e1e8f9fd3e97be3318e87ba887a2812bbaf
4
- data.tar.gz: 58d660e6959229c7a25edb8e5751bbc823d56d50
3
+ metadata.gz: 86629357a2894bef36a64e5b1509b7e9a15cef85
4
+ data.tar.gz: 943b4fe8c567c4c92d638efe961b8f07146843b9
5
5
  SHA512:
6
- metadata.gz: de2cba23be869308edfab2ef38b4e5917da0febe76649f7ecf9f3d506a9b55fc5ec480b1ff2736caabaf5d598662ab27d6d45ed7decd3361c34a5be46170deae
7
- data.tar.gz: 0ba2a56191d7fe9144c86fffdd7278bae52e4bb64a2fdc61dfd6f18adcc62a45796acff67f7ecf35a5461cbc849cde20e585e94d4ac27d160bfa7991748b225f
6
+ metadata.gz: 0a4b7c799474d1aff7511a8f77f4993b1f7cc70d59a0f83974cef653ae775bdc6636580046ef1ac8a912d90f3524a5ebcc0a26b04557999617354d6240ad5285
7
+ data.tar.gz: ad01edca0cd23d63c53165f6fccb5bf22ee41aa16c1e3abbf38e4fdafaae50a629749e36f1c9a56d2fdb41063a611594a3d6531c26dd966076113f1711029f33
@@ -2,7 +2,7 @@ module Associationist
2
2
  module Associations
3
3
  class CollectionAssociation < ::ActiveRecord::Associations::HasManyAssociation
4
4
  def association_scope
5
- reflection.config.scope_proc.call(owner)
5
+ @_association_scope ||= reflection.config.scope_proc.call(owner)
6
6
  end
7
7
 
8
8
  def find_target?
@@ -2,11 +2,11 @@ module Associationist
2
2
  module Associations
3
3
  class SingularAssociation < ::ActiveRecord::Associations::SingularAssociation
4
4
  def association_scope
5
- if reflection.config.scope_proc
6
- reflection.config.scope_proc.call(owner)
7
- else
8
- raise NotImplementedError
9
- end
5
+ @_association_scope ||= if reflection.config.scope_proc
6
+ reflection.config.scope_proc.call(owner)
7
+ else
8
+ raise NotImplementedError
9
+ end
10
10
  end
11
11
 
12
12
  def find_target
@@ -1,3 +1,3 @@
1
1
  module Associationist
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: associationist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - CicholGricenchos