slash_admin 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/slash_admin/models_controller.rb +2 -2
- data/lib/slash_admin/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf1f27f49b9b55f98ce8af943d5c3c9c0a682810da3f9439339215fcbe74f1d0
|
4
|
+
data.tar.gz: 7a81000b24701b380fb4c9cdcccb8d74635ac8b5af99e6fe06b5cc8edba64d46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 648584d064c58d2ba54c656c249ff10f4f4c486e3fd075d69e1c3d022e7a34a1671a4ae21623fffbc9e5e78db021d4a65fd474110ce267c261c2554846e1c6b4
|
7
|
+
data.tar.gz: 7ab8584258a1d35fb28c6283cc11d04015c3373a5e107ddef223d615f2e0f683452f25580b2d259cfd8acfa2374c433fd8a828346c041c55bd41d1db53d88c8c
|
@@ -22,8 +22,7 @@ module SlashAdmin
|
|
22
22
|
column = @model_class.arel_table[params[:order_field].to_sym]
|
23
23
|
order = params[:order].downcase
|
24
24
|
if %w[asc desc].include?(order)
|
25
|
-
|
26
|
-
if (!attributes.include?(params[:order_field]) && @model_class.method_defined?(params[:order_field])) || @models_export.is_a?(Array)
|
25
|
+
if @models_export.is_a?(Array)
|
27
26
|
@models = if order == "asc"
|
28
27
|
@models_export.sort { |m1, m2| m1.send(params[:order_field]) <=> m2.send(params[:order_field]) }
|
29
28
|
else
|
@@ -233,6 +232,7 @@ module SlashAdmin
|
|
233
232
|
if @model_class.respond_to?(:translated_attribute_names) && @model_class.translated_attribute_names.include?(attr.to_sym)
|
234
233
|
attr = "#{@model_class.name.singularize.underscore}_translations.#{attr}"
|
235
234
|
end
|
235
|
+
# aggregate_reflections ?
|
236
236
|
attr_prefixed = model.table_name + "." + attr
|
237
237
|
case attr_type
|
238
238
|
# TODO : Should be rewritten
|
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.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- KOVACS Nicolas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-11-
|
11
|
+
date: 2019-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|