active_admin_simple_life 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/config/locales/en.yml +4 -0
- data/config/locales/ru.yml +4 -0
- data/lib/active_admin_simple_life/menu_elements.rb +13 -1
- data/lib/active_admin_simple_life/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 505eb61a93bea44261d4c9409670ea93d89d37a9
|
4
|
+
data.tar.gz: e44b26a3ef3c868d94fbb574cc8c1dc7486c2c3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8977c001b6cce3653480bb57e52339a080bc26cfde5edbb6864296f9a20c76f257bb9d26d4e0fad5d7e0bd32f3cfdad7c0eb6496938ef199bb3e11408905a6f7
|
7
|
+
data.tar.gz: cadf7c2231a6568e6e077ae52ba1c932f8ee85882eeedf2a25b4733d170cab390d7cf29ca1abe4b674414120157d1c7a5439e7bc2aa0e8b9307dcf7319b66a14
|
data/README.md
CHANGED
data/config/locales/en.yml
CHANGED
data/config/locales/ru.yml
CHANGED
@@ -28,8 +28,15 @@ module ActiveAdminSimpleLife
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
+
# it check only for gender field for now
|
31
32
|
def filter_for_main_fields(klass)
|
32
|
-
klass.main_fields.each
|
33
|
+
klass.main_fields.each do |f|
|
34
|
+
if f == :gender
|
35
|
+
filter f.cut_id, collection: genders
|
36
|
+
else
|
37
|
+
filter f.cut_id
|
38
|
+
end
|
39
|
+
end
|
33
40
|
end
|
34
41
|
|
35
42
|
def form_for_main_fields(klass, &block)
|
@@ -78,5 +85,10 @@ module ActiveAdminSimpleLife
|
|
78
85
|
def span_false
|
79
86
|
Arbre::Context.new { span(class: "status_tag no") { I18n.t "boolean.disactive" } }
|
80
87
|
end
|
88
|
+
|
89
|
+
def genders
|
90
|
+
[[I18n.t("active_admin.genders.male"), true],
|
91
|
+
[I18n.t("active_admin.genders.female"), false]]
|
92
|
+
end
|
81
93
|
end
|
82
94
|
end
|
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.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kvokka
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|