tramway-core 3.0.1 → 4.0.1

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: 1c17a0e36bdb5090350f421917e739f044af1f07f3b6a527da8656cdc0175569
4
- data.tar.gz: 4067d380e669a837e960eadd8003798ca30c6cb13ee2867dd1201225ca783ca3
3
+ metadata.gz: 60e501986748c5fcfe27092b525dcf97a9f8a591e9a00ea9659f150b746123d1
4
+ data.tar.gz: 840750721db0f18d04437cd3e840bcf311094aa044dc95cb9f1c50f2e520e516
5
5
  SHA512:
6
- metadata.gz: 626efa3f64700a7b18dce52974e7c9cf860c26e8f4dd7355024504c4e43f8adb6a2975b1a4b98495e2608d3abc50e00367dad14d9029c81023c58caeff9f182d
7
- data.tar.gz: e59aeaaefa0cc3bb453a20535b3b205bf5e041166bc2ddc306389b5d0d0c4708aee7eed14dce948e5b9b667321ca25e21d58e72181d814165796f377788131c7
6
+ metadata.gz: 341c866e0797198604e6edc1f5275b0b0636e1b24635b5c5a019050f1ee86f46eb664fee80256170db9e41219d926c004bdc7368d32e8afafec417c6595e0b87
7
+ data.tar.gz: fb50c72df380f9c9bc23564414c06131444b838ea9e6810a0decf083add8a6234283ac83405d539360190282d5123ec7c7ecac2d8e3e206368339c2c9d9b29d2
@@ -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
@@ -62,7 +62,7 @@ class Tramway::Core::ApplicationDecorator
62
62
  end
63
63
 
64
64
  def decorate(object_or_array)
65
- if object_or_array.class.superclass == ActiveRecord::Relation
65
+ if object_or_array.class.superclass == ActiveRecord::Relation || object_or_array.class.to_s.include?('ActiveRecord_AssociationRelation')
66
66
  decorated_array = object_or_array.map do |obj|
67
67
  new obj
68
68
  end
@@ -6,13 +6,15 @@
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
+ = form.association property, **association_params(**input_params).merge(as: :hidden, input_html: { value: value || form_object.public_send(property).id })
16
18
  - when :polymorphic_association
17
19
  = form.input property, **polymorphic_association_params(**input_params.merge(value: value))
18
20
  - else
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Core
5
- VERSION = '3.0.1'
5
+ VERSION = '4.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.1
4
+ version: 4.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-11 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