tramway-admin 2.1.0.2 → 2.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: efe8998e6d28614e1a7bf88a24ac91cd9635c807db0b1f14c912df66c94bf663
|
4
|
+
data.tar.gz: 4f142c6de6479a892b88b60a29017c7cf791e0c2943e1c8fbb0b038ff279e93c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1187272662360971342253d641daf9b8ab27e218bea93f68b7dda3505bd791ad1d38872c18aea7fa607e8bf1be9d2b1bb4fe1ea4d8fdce96834d4262d66df46
|
7
|
+
data.tar.gz: 53b6d3b617ebbf6b53747d6e56b523fe252466654847902b2735a05969a4a23ff95af6ae08537426ccd46c3471ecaf95fd889ea34e8146b3eb57a7c1a6bb417b
|
@@ -1,16 +1,19 @@
|
|
1
|
-
- if object.class.show_associations.
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
=
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
1
|
+
- if object.class.show_associations.nil?
|
2
|
+
= "Please, fill show associations method in decorator"
|
3
|
+
- else
|
4
|
+
- if object.class.show_associations.map(&:to_s).include? association.name.to_s
|
5
|
+
- association_type = association.class.to_s.split('::').last.sub(/Reflection$/, '').underscore.to_sym
|
6
|
+
%tr
|
7
|
+
%td
|
8
|
+
= model_class.human_attribute_name association.name
|
9
|
+
%hr
|
10
|
+
- if association_type != :has_one || !object.send(association.name).present?
|
11
|
+
= link_to "#{I18n.t('helpers.actions.add')} #{model_class.human_attribute_name(association.name).singularize.downcase}", new_associated_record_path(association: association, object: object, as: object.send("#{association.name}_as")), class: 'btn btn-primary'
|
12
|
+
%td{ colspan: 2 }
|
13
|
+
- if association_type.in? [ :has_one, :belongs_to ]
|
14
|
+
%table.table.table-striped.table-bordered
|
15
|
+
= render 'tramway/admin/shared/show/associations/table_row', object: object, association: association, association_object: object.send(association.name)
|
16
|
+
- else
|
17
|
+
%table.table.table-striped.table-bordered
|
18
|
+
- object.send(association.name)&.each do |association_object|
|
19
|
+
= render 'tramway/admin/shared/show/associations/table_row', object: object, association: association, association_object: association_object
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tramway-admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Kalashnikov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tramway-core
|
@@ -310,7 +310,7 @@ files:
|
|
310
310
|
- lib/tramway/admin/tramway_model_helper.rb
|
311
311
|
- lib/tramway/admin/version.rb
|
312
312
|
- lib/tramway/admin/welcome_page_actions.rb
|
313
|
-
homepage: https://github.com/
|
313
|
+
homepage: https://github.com/purple-magic/tramway-admin
|
314
314
|
licenses:
|
315
315
|
- MIT
|
316
316
|
metadata: {}
|
@@ -329,7 +329,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
329
329
|
- !ruby/object:Gem::Version
|
330
330
|
version: '0'
|
331
331
|
requirements: []
|
332
|
-
rubygems_version: 3.
|
332
|
+
rubygems_version: 3.2.3
|
333
333
|
signing_key:
|
334
334
|
specification_version: 4
|
335
335
|
summary: Engine for admin
|