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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 529b5f8a64a008d6bf7d0d06323887ef33d5437e87fa0ed740687b1cb6751400
4
- data.tar.gz: 83fa2ee3b66c07d3473d6298007267e0faaa37404bc75fe486518358fcb7d1f1
3
+ metadata.gz: 1c17a0e36bdb5090350f421917e739f044af1f07f3b6a527da8656cdc0175569
4
+ data.tar.gz: 4067d380e669a837e960eadd8003798ca30c6cb13ee2867dd1201225ca783ca3
5
5
  SHA512:
6
- metadata.gz: 2a30c44169bc75fff6ed5244a8fa498cd4ee206c43e7240e23982f581aacdb6ab80c370cdaec839f119c956003acfd84f9b3b19c1b9fc73ca20100dfcdbc387b
7
- data.tar.gz: 9f754f5466c6fd0e0deb2b66ee84909f1162bee38f7d7e4a6217d73eef95cb98ed2471ce3a37adb680415f8c96b4ef5980c67f13ea1c510181ebf00a64ffe02f
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),
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Core
5
- VERSION = '3.0.0.2'
5
+ VERSION = '3.0.1'
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: 3.0.0.2
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-10 00:00:00.000000000 Z
12
+ date: 2022-01-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: audited