active_admin_simple_life 0.1.1 → 0.1.2
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 059f403f8012aa9bd4e592258b2b1c6995a7f90c
|
4
|
+
data.tar.gz: f32438e38df93cc3af33bb9ce3a1d0ea297a970f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5484452ccff07d5ef7cfb6bfd78f27dfbbd6d7a50ee6f8a0a03e5a727fdb42a2a7568e1837c7d2daf42326c5b911563f0107158f146a2597a9103618393e3c0
|
7
|
+
data.tar.gz: 85d6fc4452715f18a68c10d9d28482383efdb6dcc4a81dd8d8e4511fe1874ce14d11e37d9766f51c44faa35d4b31bb3d8450812536c50152bc87eb5c2446f5df
|
@@ -12,6 +12,7 @@ module ActiveAdminSimpleLife
|
|
12
12
|
id_column
|
13
13
|
klass.main_fields.insert(position, *add_fields).each do |symbol|
|
14
14
|
column(I18n.t("activerecord.attributes.#{klass.to_s.underscore}.#{symbol}"), sortable: symbol) do |current|
|
15
|
+
plural_symbol = symbol.to_s.pluralize
|
15
16
|
field_value = current.send(ExtensionedSymbol.new(symbol).cut_id)
|
16
17
|
case field_value
|
17
18
|
when ActiveRecord::Base
|
@@ -24,7 +25,11 @@ module ActiveAdminSimpleLife
|
|
24
25
|
when FalseClass
|
25
26
|
span_false
|
26
27
|
else
|
27
|
-
|
28
|
+
if klass.respond_to?(plural_symbol)
|
29
|
+
field_value && I18n.t("activerecord.attributes.#{klass.underscore}.#{plural_symbol}.#{field_value}")
|
30
|
+
else
|
31
|
+
truncate_field field_value.to_s, max_length
|
32
|
+
end
|
28
33
|
end
|
29
34
|
end
|
30
35
|
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.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kvokka
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|