tramway-core 2.0.0.1 → 2.0.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 00bb04a9c6afb2c0803e4b0d8ee009ce9af3b511564793933c1e21862345fe16
4
- data.tar.gz: f2b70d7ee88943a6e134764fc582830d46fbcc78eda2712e6974c5887432bfe6
3
+ metadata.gz: 4dbb6d923746b41bbbed1c34117eba25f3a6d06846ea5bdac53436e2944d8141
4
+ data.tar.gz: c61da707591a4115e0deb6a33890ab366d4db87566b207e0d38e7904f964f6a3
5
5
  SHA512:
6
- metadata.gz: 49ec7b81fa82bf40b32f32d2a716f5affbbb7428b2934506697d6f3a79c9f34b2a849570e9f90b09da27af79738422748ec98ca5a576c71295b64dfe1415f93f
7
- data.tar.gz: e623ac3c3a5e189459d5144a3227807ea4229eb6b5a54c49b65177c0da5d4c60d463e545c19f9459c3f25c1f22d0acef25ca8011171f84ce616d1e54ce155d5b
6
+ metadata.gz: 5df58e56f67f5b0138ea7dfcf51304cb49093a89c98bd50ed57b5608ca6a734758839d35583db19f4b2e3c8fe6ff18868a716d028c08c035ddb4638dd71a4539
7
+ data.tar.gz: 11d67d63f81948c389cd4febd6018b98b27eb46ada7a988fd5f66ef9a472fd67a192e6d15c170b737ab2d2a1a62d7351e76219ff80b260ccea86607ef2128bd7
@@ -45,6 +45,9 @@ module Tramway::Core::InputsHelper
45
45
  id: params.dig(model_class.to_s.underscore, property.to_s),
46
46
  type: params.dig(model_class.to_s.underscore, "#{property}_type")
47
47
  }
48
+ when :association, 'association'
49
+ association = model_class.reflect_on_all_associations.select { |ass| ass.name == property }.first
50
+ params.dig(model_class.to_s.underscore, association.options[:class_name].underscore)
48
51
  else
49
52
  params.dig(model_class.to_s.underscore, property.to_s)
50
53
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Core
5
- VERSION = '2.0.0.1'
5
+ VERSION = '2.0.0.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.1
4
+ version: 2.0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov