tramway-core 1.5 → 1.5.1

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: 2fb47273ad7fbf8b69de9fee539923577bd3f6306128825f6e1090ecbaf4dd64
4
- data.tar.gz: 5704003c0d2aa42b1252a902165dddf278221d9023bfcf8973e0e2adc72b9ab6
3
+ metadata.gz: 5cfb4845d367cb5bfc81ab7151aa232a562714bbe9b3d2f0609ad960030ea465
4
+ data.tar.gz: 07e193a08f31ad3fdd23d6cbabd8454f657c0b973b46a27111d7aa9a5d4845e6
5
5
  SHA512:
6
- metadata.gz: 1b4a09691cd871d95dd2d20a2bfb024d261519932e2b14f65bf564268e5d688a6b54d1b4d312c401248a2b69e4ff0c0fe10f4a02d9d564288be122a6d522b7d0
7
- data.tar.gz: 67daeb423c28eb53e65eb7ffda0481855680a247b4d9394ea5df719787003e4a753148b71db9e2ce66c86ce26f407b963f04f7ccd3e110d9ef466ad5bbe8235c
6
+ metadata.gz: c3f29f9dfdb6396550ee273b6abad1c03c499bd1d37fb00431fad213faacf5898716234467b03d535e486b585f0c00313e6972d825d00fae5badcf85304ee39d
7
+ data.tar.gz: ae3ef4540309b69afae98f85d3a0fd6d2746613dd353e3926fbc4ddd03e2a898c4ac819b25b3a85450426f40fcc35fba6c793877a7a9147da1292f3036b08c44
@@ -5,7 +5,8 @@ module Tramway::Core
5
5
  @@associations&.each do |association|
6
6
  class_name = object.class.reflect_on_all_associations(:belongs_to).select do |a|
7
7
  a.name == association.to_sym
8
- end.first.options[:class_name].constantize
8
+ end.first&.options&.require(:class_name)&.constantize
9
+ next unless class_name
9
10
 
10
11
  self.class.send(:define_method, "#{association}=") do |value|
11
12
  super class_name.find value
@@ -1,5 +1,5 @@
1
1
  module Tramway
2
2
  module Core
3
- VERSION = '1.5'
3
+ VERSION = '1.5.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-core
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.5'
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-19 00:00:00.000000000 Z
11
+ date: 2018-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: reform-rails