redisize 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
  SHA256:
3
- metadata.gz: f518b11244f545e6dbbd246a4953ee00e85315a9305200c52bfbc1d09359662c
4
- data.tar.gz: 00f2823251a2351b81cda954070794ad6473fcc0ff5b234ff156f326b991ffa5
3
+ metadata.gz: 5b7b65e687f5003dac2ba7e92d42450cea066554ce88bccb49c210ff0a413d41
4
+ data.tar.gz: 95e775070c058d4f3804d03bb082969146c6e5402aec915d489a11eca262214e
5
5
  SHA512:
6
- metadata.gz: f0041a03011688e066bc5725fc3cb78fb8c0b8bd32bd58b32560d3c9869382707932e5f31293691d21862fa82983bf40005ccbbacfc6fafadc12e046a10dde99
7
- data.tar.gz: 316bcd2d0ea078e320188b630b79f9c85e351643acb026ed4b9c460d5f5eb33715373f9188a2578e8f5d0461bf9a16db977e653e08146a7e1d7c771fd936d592
6
+ metadata.gz: b26a2aa8e95fd8de86db627fb45207af2bbebaaaf5fc468b2b4ed8d2f9675a83f8e4852c8d1adbd1150a03bd4dd00a588d2c67c9b5a3ed30f30ddb7f05544c72
7
+ data.tar.gz: b2493b59261c6c0cbe9962c6dd7e97b635de114695d77373c56608a723b78d9f2e655d59605c2788b4ca978f0e2161b0177c3db7c3c6673126af95dd5e9f1d19
@@ -1,3 +1,3 @@
1
1
  module Redisize
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
data/lib/redisize.rb CHANGED
@@ -291,7 +291,13 @@ module Redisize
291
291
 
292
292
  module ClassMethods
293
293
  def polymorphic_base_name
294
- (base_class.to_s.split("::")[0...-1] + [polymorphic_name]).join("::")
294
+ base_name = base_class.to_s
295
+
296
+ if base_name == polymorphic_name
297
+ polymorphic_name
298
+ else
299
+ (base_class.to_s.split("::")[0...-1] + [polymorphic_name]).join("::")
300
+ end
295
301
  end
296
302
 
297
303
  # self -> model class
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redisize
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
  - Pavel «Malo» Skrylev