active_record_shards 3.15.1 → 3.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/active_record_shards/default_slave_patches.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bc7e3f2c8928e0eaef1b01e03be3a0c5a12b6313ea5093f1abce4117ab7f6b65
|
|
4
|
+
data.tar.gz: 1e9f1249f57b5a40c02b99a57cf830dfcab5e6712122a366e50a30ba0d9f07ca
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9efe5b8585ca8defeadc67652f2893a572aa9f4e7c8e3bfacbc9121d701d8db42ca32254a72d04964ee1d000fee441ce6afead286bef00ef36224ba64da32e57
|
|
7
|
+
data.tar.gz: a5602bbb2ef644ef588c85a0019b602b7f60cd3fd28635ebbd210e53eff5d19ae325ded5eac862dcaae2d6fdf035c3bced70a9b87b018c0301ecf86b34a417ad
|
|
@@ -96,6 +96,11 @@ module ActiveRecordShards
|
|
|
96
96
|
[:calculate, :exists?, :pluck, :load].each do |m|
|
|
97
97
|
ActiveRecordShards::DefaultSlavePatches.wrap_method_in_on_slave(false, base, m)
|
|
98
98
|
end
|
|
99
|
+
|
|
100
|
+
if ActiveRecord::VERSION::MAJOR == 4
|
|
101
|
+
# `where` and `having` clauses call `create_binds`, which will use the master connection
|
|
102
|
+
ActiveRecordShards::DefaultSlavePatches.wrap_method_in_on_slave(false, base, :create_binds)
|
|
103
|
+
end
|
|
99
104
|
end
|
|
100
105
|
|
|
101
106
|
def on_slave_unless_tx
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: active_record_shards
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.15.
|
|
4
|
+
version: 3.15.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Benjamin Quorning
|
|
@@ -13,7 +13,7 @@ authors:
|
|
|
13
13
|
autorequire:
|
|
14
14
|
bindir: bin
|
|
15
15
|
cert_chain: []
|
|
16
|
-
date: 2019-10-
|
|
16
|
+
date: 2019-10-11 00:00:00.000000000 Z
|
|
17
17
|
dependencies:
|
|
18
18
|
- !ruby/object:Gem::Dependency
|
|
19
19
|
name: activerecord
|