tramway-core 3.0.1.1 → 4.0.1.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: 2b99587fbe190053316f4d481dc7746599a74a11875ead37b4e3ac3836d6fd56
4
- data.tar.gz: 4d41fa71e1107c838188fae3a2e7910fee5faf7015e24d716305181ee19bb6eb
3
+ metadata.gz: d97bc6473e7518d3f69d5aa23b445097361723523401b62dd0c8218ab0e6f806
4
+ data.tar.gz: e0c120b4e8865bbb09404330955cb038d7435cbc7fd7c13c11ca9aaefd494c6a
5
5
  SHA512:
6
- metadata.gz: a251c2005d7b60b6b9e9bf4e14fea41d9a161975ba29be43d1749ccefcc0e992069ccaab52608209ba4d7f325e2e3144fcd0c912bb61031a29da2ce742cffdf4
7
- data.tar.gz: 6ced496aa25871420199747b46d30c9c1289813b08d76aec995da10eace435adc1fe344491f4563dde407d35b9a2f739c10369b9406738fefd6233edccc37c0a
6
+ metadata.gz: ff3cd1dd1a2a5ab4e441355627658f26a905005d20c77dc99ae9759037d7b2e5d6e36db2b4637c7053de21bf121e2e30af36ca42c590b2778f6df9d45acfa809
7
+ data.tar.gz: aebb6bf91fa3b3ada3575d5cc38d8e2d1fbd99b82df8a6d2653b437208fa0c32f638e14fdde964eab5bb033352449318d137f06768c721f0a805daebebee7f11
@@ -1,10 +1,6 @@
1
- // require popper FIXME should be optional requiring
2
1
  //= require jquery
3
2
  //= require jquery_ujs
4
3
  //= require jquery3
5
- //= require popper
6
- // require popper FIXME should be optional requiring
7
- //= require bootstrap
8
4
  //= require bootstrap-datepicker-1.8.0
9
5
  //= require bootstrap-datepicker-1.8.0.ru.min
10
6
  //= require font_awesome5
@@ -6,13 +6,18 @@
6
6
  - type = type[:type]
7
7
  - if type.class.in?([ Symbol, String ]) || type&.dig(:input_options)
8
8
  - type = type.to_sym
9
- - unless type == :hidden
9
+ - if type != :hidden && input_params.dig(:options, :label) != false
10
10
  = form.label form_object.model.class.human_attribute_name property
11
11
  - case type
12
12
  - when :default
13
13
  = form.input property, **default_params(**input_params)
14
14
  - when :association
15
15
  = form.association property, **association_params(**input_params)
16
+ - when :hidden_association
17
+ - if form_object.public_send(property)&.id
18
+ = form.association property, **association_params(**input_params).merge(as: :hidden, input_html: { value: form_object.public_send(property)&.id })
19
+ - else
20
+ = form.association property, **association_params(**input_params).merge(as: :hidden)
16
21
  - when :polymorphic_association
17
22
  = form.input property, **polymorphic_association_params(**input_params.merge(value: value))
18
23
  - else
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Core
5
- VERSION = '3.0.1.1'
5
+ VERSION = '4.0.1.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.1.1
4
+ version: 4.0.1.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-17 00:00:00.000000000 Z
12
+ date: 2022-02-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: audited