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 +4 -4
- data/lib/active_record_inherit_assoc.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea75f7b36b592c164adc0681e3ce45891db2db2c
|
4
|
+
data.tar.gz: 39fc2cbc13071657fbe1b1352ced4d598da58572
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
+
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-
|
11
|
+
date: 2017-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|