active_record_inherit_assoc 2.4.0 → 2.5.0

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: a2efe1e9964470b196b19904b0c18d3bffa25c27
4
- data.tar.gz: 660abaa951a9b06387b61ed9a0aabb877210e7a8
3
+ metadata.gz: ea75f7b36b592c164adc0681e3ce45891db2db2c
4
+ data.tar.gz: 39fc2cbc13071657fbe1b1352ced4d598da58572
5
5
  SHA512:
6
- metadata.gz: 8ad7890d3eba67e014a2003a414de5b5aefbbaf5b265f38e659c29af8b367fce8e11064ec4e076f4b891e2d2078259cc8f8444b4f589c3313e51854bdf544749
7
- data.tar.gz: 21cdc15532547c4ac5ae517cb7c179e04511eea2264b691063b10557741fcd00c1f5432530280088687e9877aaec50228e42e9d811e31025e19988d6797d51f5
6
+ metadata.gz: 03ff93fd9cc642d5a15eaec01718cb9671267826a95822ee6ca8aaf58eb46d2afd2ef7b384c16e1b0a5395bfc16926ad145d1202a9b68cca25fc73fdefd85cc4
7
+ data.tar.gz: 30d3fd6d78a8c18acd10f9e2c56452847d694def8650a789f18fe4fe8c41a4c27d7c36993d7dd4e9f739044c40f1ac28fb5dc9b6b92afe34acd8f7ad3ff366e2
@@ -33,6 +33,12 @@ module ActiveRecordInheritAssocPrepend
33
33
  return nil unless reflection.options[:inherit]
34
34
  Array(reflection.options[:inherit]).inject({}) { |hash, association| hash[association] = owner.send(association) ; hash }
35
35
  end
36
+
37
+ if ActiveRecord::VERSION::MAJOR >= 4
38
+ def skip_statement_cache?
39
+ super || !!reflection.options[:inherit]
40
+ end
41
+ end
36
42
  end
37
43
 
38
44
  ActiveRecord::Associations::Association.send(:prepend, ActiveRecordInheritAssocPrepend)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record_inherit_assoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Osheroff
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-06 00:00:00.000000000 Z
11
+ date: 2017-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord