tramway-core 1.5.1 → 1.5.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 +4 -4
- data/app/forms/tramway/core/application_form.rb +4 -3
- data/lib/tramway/core/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 618522505bb149acbb057252aa47de22d0818fe6cf0a0e32ca8098d20dc6541c
|
|
4
|
+
data.tar.gz: dad742f422cab524f4d0579ef43133937ac6a7205cf78080fd52fd710d88d9f1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ee07e8ce64c7a7bcd5a19698509ff11a073454d356f8eba5e34cc2d10bf14a0a83cd6e07f4bcb5cfe375250eefff5e52391a7525224bc77d1ece1b43afcc2418
|
|
7
|
+
data.tar.gz: e6f696f20c29348fd7f75fd1c193a7d320eace9dde4a33b773e3b99c874a0792721615df6ac7e3ceb0ac8344adc0f4164334de6e86532f147772486e80eb9657
|
|
@@ -3,11 +3,12 @@ module Tramway::Core
|
|
|
3
3
|
def initialize(object)
|
|
4
4
|
super(object).tap do
|
|
5
5
|
@@associations&.each do |association|
|
|
6
|
-
|
|
6
|
+
options = object.class.reflect_on_all_associations(:belongs_to).select do |a|
|
|
7
7
|
a.name == association.to_sym
|
|
8
|
-
end.first&.options
|
|
9
|
-
next unless
|
|
8
|
+
end.first&.options
|
|
9
|
+
next unless options
|
|
10
10
|
|
|
11
|
+
class_name = options[:class_name].constantize
|
|
11
12
|
self.class.send(:define_method, "#{association}=") do |value|
|
|
12
13
|
super class_name.find value
|
|
13
14
|
end
|
data/lib/tramway/core/version.rb
CHANGED
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.2
|
|
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-
|
|
11
|
+
date: 2018-09-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: reform-rails
|