bsm_models 0.2.3 → 0.2.4

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.
@@ -15,6 +15,8 @@ module Bsm::Model::StiConvertable
15
15
  # @Override: Allow to specify a kind
16
16
  def new(attributes = nil, *args, &block)
17
17
  kind = (attributes = attributes.with_indifferent_access).delete(:kind) if attributes.is_a?(Hash)
18
+ return super if real_type?
19
+
18
20
  klass = real_descendants.find {|k| k.kind == kind } || fallback_descendant
19
21
  return super if klass == self
20
22
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bsm_models
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 3
10
- version: 0.2.3
9
+ - 4
10
+ version: 0.2.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dimitrij Denissenko