tramway-core 3.0.1 → 4.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60e501986748c5fcfe27092b525dcf97a9f8a591e9a00ea9659f150b746123d1
|
4
|
+
data.tar.gz: 840750721db0f18d04437cd3e840bcf311094aa044dc95cb9f1c50f2e520e516
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
-
|
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
|
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:
|
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-
|
12
|
+
date: 2022-02-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: audited
|