active_admin_simple_life 0.0.8 → 0.0.9
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
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9f28c4f3a3c512bf8c10f9f6a65af502cae770ef
|
|
4
|
+
data.tar.gz: a9b945a1b6698444d3475600a9f9cedb85abfa20
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dab140aa15d768bca97e228ad74ab3f5b426e4f622c842994c20334a6f726a5b16a27a6b982c8da718c56473c84379416dce0b293c25427e07059d2bcab75438
|
|
7
|
+
data.tar.gz: b412441e86bdb3e5357151e094f847a31cd7275809c48f0faa5c1df3e1abe2add453dad8d014ed4e4bb14c790a9bf692d65759b344df4e3f980b30ef418add10
|
|
@@ -43,7 +43,14 @@ module ActiveAdminSimpleLife
|
|
|
43
43
|
form do |f|
|
|
44
44
|
f.semantic_errors(*f.object.errors.keys)
|
|
45
45
|
f.inputs do
|
|
46
|
-
klass.main_fields.each
|
|
46
|
+
klass.main_fields.each do |ff|
|
|
47
|
+
ff_cut_id = ff.cut_id
|
|
48
|
+
if collection? ff
|
|
49
|
+
f.input ff_cut_id, as: :select, member_label: :to_s
|
|
50
|
+
else
|
|
51
|
+
f.input ff_cut_id
|
|
52
|
+
end
|
|
53
|
+
end
|
|
47
54
|
f.instance_eval(&block) if block_given?
|
|
48
55
|
end
|
|
49
56
|
f.actions
|
|
@@ -78,12 +85,17 @@ module ActiveAdminSimpleLife
|
|
|
78
85
|
"edit_admin_#{field.class.to_s.underscore}_path"
|
|
79
86
|
end
|
|
80
87
|
|
|
88
|
+
def collection?(symbol)
|
|
89
|
+
true if symbol.to_s =~ /_id$/
|
|
90
|
+
false
|
|
91
|
+
end
|
|
92
|
+
|
|
81
93
|
def span_true
|
|
82
94
|
Arbre::Context.new { span(class: "status_tag yes") { I18n.t("boolean.active") } }
|
|
83
95
|
end
|
|
84
96
|
|
|
85
97
|
def span_false
|
|
86
|
-
Arbre::Context.new { span(class: "status_tag no") { I18n.t "boolean.
|
|
98
|
+
Arbre::Context.new { span(class: "status_tag no") { I18n.t "boolean.disactive" } }
|
|
87
99
|
end
|
|
88
100
|
|
|
89
101
|
def genders
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: active_admin_simple_life
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kvokka
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-
|
|
11
|
+
date: 2016-05-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|