active_record_shards 3.3.8 → 3.4.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: 980b70eaf5ffddcd5bf9cd6a5eb4b273d4cf44b2
4
- data.tar.gz: bbd7dad9a93782e167c8b57b9e181f553e026e74
3
+ metadata.gz: c48575c9907cac72f3a71adb3fd5e1682908c6f3
4
+ data.tar.gz: b70f89745d6522f1305bf4c453ee20201f7689d4
5
5
  SHA512:
6
- metadata.gz: 0c95e6b73354dbc310dfca4310c5573e207013a8a834eed811f5c14e69c65ed59a1c51334f6f9e04b3a598d690c1f7c0084ba57524e459c6d67527d726048b13
7
- data.tar.gz: 411529c94179ce6dafeca4bda7fae80cd9d1731bfa47ac35e870dd4a911d051b7d6fe40ccb7a69bc3d3e009a0d47aa2ab808b531878b850c28b4046e8137f66d
6
+ metadata.gz: 1800ad20d9bd1b19f3e67b7212bca66ac80679ec0586eae5bebe83d232babc1946ec46f1778f9a635e477efc72f073812b2b7b7b00dceac6409fe342f003cb49
7
+ data.tar.gz: 82af6aa117265314f780e5b5061b42a61507ec20b1da93d71adb36dff3f14e74f83aea154f6fe10a2353b20f0182372ca28581f18d1e5249a76bb7db799762ce
@@ -1,7 +1,7 @@
1
1
  module ActiveRecordShards
2
2
  module Model
3
3
  def not_sharded
4
- if self == ActiveRecord::Base || self != base_class
4
+ if self != ActiveRecord::Base && self != base_class
5
5
  raise "You should only call not_sharded on direct descendants of ActiveRecord::Base"
6
6
  end
7
7
  @sharded = false
@@ -9,7 +9,7 @@ module ActiveRecordShards
9
9
 
10
10
  def is_sharded?
11
11
  if self == ActiveRecord::Base
12
- supports_sharding?
12
+ @sharded != false && supports_sharding?
13
13
  elsif self == base_class
14
14
  if @sharded.nil?
15
15
  ActiveRecord::Base.is_sharded?
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.3.8
4
+ version: 3.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mick Staugaard