slash_admin 1.3.0 → 1.3.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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 47c492084c28af99b79339457415f1c9cabb8dfc933b5d768b4a456521118abe
|
|
4
|
+
data.tar.gz: 3b499b584c19cae24461b73d64e239196f5dd2f52b18d22f9e529e456850ac87
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7dbf6990a0a0f70213a37f6340721f0be1a8d2db55fb7820f54055170e741e01d5fd6a4d4c7fad043ef6667b816a47ec712bc232683c6b741c8eb9219562aece
|
|
7
|
+
data.tar.gz: fe6fcdf161dcd72a63b69a155764cc7630cc235f24141676d2d987dd61bf25cc753d604b2d6d85907b960834679d2853fd36a1c96b30bc471dea14c57bcd97ca
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
<%= render 'slash_admin/shared/tooltip', a: a %>
|
|
3
3
|
<%= f.collection_select a.to_s + '_id',
|
|
4
4
|
class_name_from_association(f.object, a).constantize.all.order(f.object.send(a).present? ? "CASE WHEN id = #{f.object.send(a).try(:id)} THEN 1 ELSE 0 END DESC" : "id DESC").limit(20), :id, object_label(class_name_from_association(f.object, a)),
|
|
5
|
-
{
|
|
5
|
+
{
|
|
6
|
+
prompt: "",
|
|
7
|
+
},
|
|
6
8
|
'data-placeholder': t('slash_admin.view.select_model', model_name: class_name_from_association(f.object, a).constantize.model_name.human.downcase),
|
|
7
9
|
'data-model': class_name_from_association(f.object, a).constantize.model_name.to_s.underscore,
|
|
8
10
|
'data-fields': "SlashAdmin::Models::#{class_name_from_association(f.object, a).classify.pluralize}Controller".constantize.new.autocomplete_params.join(' '),
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
<%= render 'slash_admin/shared/tooltip', a: a %>
|
|
3
3
|
<%= f.select a.to_s,
|
|
4
4
|
class_name_from_association(f.object, a).constantize.all.order(f.object.send(a).present? ? "CASE WHEN id = #{f.object.send(a).try(:id)} THEN 1 ELSE 0 END DESC" : "id DESC").limit(20).collect { |assoc| [assoc.send(object_label(class_name_from_association(f.object, a))), assoc.id] },
|
|
5
|
-
{
|
|
5
|
+
{
|
|
6
|
+
prompt: "",
|
|
7
|
+
},
|
|
6
8
|
'data-placeholder': t('slash_admin.view.select_model', model_name: class_name_from_association(f.object, a).constantize.model_name.human.downcase),
|
|
7
9
|
'data-model': class_name_from_association(f.object, a).constantize.model_name.to_s.underscore,
|
|
8
10
|
'data-fields': "SlashAdmin::Models::#{class_name_from_association(f.object, a).classify.pluralize}Controller".constantize.new.autocomplete_params.join(' '),
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
<% class_name_from_association = class_name_from_association(f.object, a) %>
|
|
4
4
|
<%= f.collection_select a.to_s + '_id',
|
|
5
5
|
class_name_from_association.constantize.all.order(f.object.send(a).present? ? "CASE WHEN id = #{f.object.send(a).try(:id)} THEN 1 ELSE 0 END DESC" : "id DESC").limit(20), :id, object_label(a),
|
|
6
|
-
{
|
|
6
|
+
{
|
|
7
|
+
prompt: "",
|
|
8
|
+
},
|
|
7
9
|
'data-placeholder': t('slash_admin.view.select_model', model_name: class_name_from_association.constantize.model_name.human.downcase),
|
|
8
10
|
'data-model': class_name_from_association.constantize.model_name.to_s.underscore,
|
|
9
11
|
'data-fields': "SlashAdmin::Models::#{a.to_s.classify.pluralize}Controller".constantize.new.autocomplete_params.join(' '),
|
data/lib/slash_admin/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: slash_admin
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- KOVACS Nicolas
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-04-
|
|
11
|
+
date: 2020-04-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|