tramway-core 3.0.0.2 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/tramway/core/inputs_helper.rb +7 -0
- 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: 1c17a0e36bdb5090350f421917e739f044af1f07f3b6a527da8656cdc0175569
|
4
|
+
data.tar.gz: 4067d380e669a837e960eadd8003798ca30c6cb13ee2867dd1201225ca783ca3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 626efa3f64700a7b18dce52974e7c9cf860c26e8f4dd7355024504c4e43f8adb6a2975b1a4b98495e2608d3abc50e00367dad14d9029c81023c58caeff9f182d
|
7
|
+
data.tar.gz: e59aeaaefa0cc3bb453a20535b3b205bf5e041166bc2ddc306389b5d0d0c4708aee7eed14dce948e5b9b667321ca25e21d58e72181d814165796f377788131c7
|
@@ -5,6 +5,13 @@ module Tramway::Core::InputsHelper
|
|
5
5
|
include Tramway::Core::Inputs::PolymorphicAssociationsHelper
|
6
6
|
|
7
7
|
def association_params(form_object:, property:, value:, object:, options: {})
|
8
|
+
full_class_name_association = form_object.class.full_class_name_association(property)
|
9
|
+
|
10
|
+
if full_class_name_association.to_s == 'Tramway::User::User'
|
11
|
+
user = defined?(current_user) ? current_user : current_admin
|
12
|
+
value = user.id
|
13
|
+
end
|
14
|
+
|
8
15
|
build_input_attributes(object: object, property: property, options: options,
|
9
16
|
value: build_value_for_association(form_object, property, value),
|
10
17
|
collection: build_collection_for_association(form_object, property),
|
data/lib/tramway/core/version.rb
CHANGED
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: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Kalashnikov
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-01-
|
12
|
+
date: 2022-01-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: audited
|