slash_admin 1.0.3 → 1.0.4

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
  SHA256:
3
- metadata.gz: 62edd28a45bf61074af98825e3e170fb86cd6fad05caf3f05e4a5d79cfb31b7a
4
- data.tar.gz: 2a24ad5ff01a620af5a1d5d5dc5344a1a1badc21ed42cbd15081915f3bd71256
3
+ metadata.gz: 5f5bde9d4de6fa2c39197e090dee5bc7c4cca1bba1081dd3ddb6242af111b253
4
+ data.tar.gz: 8b1ef63565ec37d1381df9d0cb51649238414e5e8a249e0bf99fd5ffd11bb319
5
5
  SHA512:
6
- metadata.gz: f95db4273083bcc6f48119511d69f5318d197898b31cc2fb27ea264e7b53b3888ccc7447a53f7f0043db6148eff98601892a63983b695f7eea0e18b22712bdfc
7
- data.tar.gz: 980a9d12a847da422fb42b99d9d78a6b9e1d92dcb0b83dffe49978612dd15401de2ebbbe7bad92efb700ccbde78a8f792fd3b2000e318528fd77e24c8be033a3
6
+ metadata.gz: c93495b0258ecd29303cfc99fc19e66f90cfdedda691c5cd318da5abe4f400954d955eb4c75f8e95fa0c81ade83022e07e8c53da119bb067b13807ab77c166d6
7
+ data.tar.gz: 23cb10977a3093ca81ab46ca6e7e376d336c93e90471eaf78a8ef922a49f660db26efb89fec1845443dd33317621f4a7bc766e15215f349cc2daad5a3e508b64
@@ -96,6 +96,10 @@ i {
96
96
  }
97
97
  }
98
98
 
99
+ p[data-f-id="pbf"] {
100
+ display: none !important;
101
+ }
102
+
99
103
  #admin-dashboard {
100
104
  background: $tertiary;
101
105
  padding-top: 68px;
@@ -22,7 +22,8 @@ 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
- if @models_export.is_a? Array
25
+ attributes = @model_class.new.attributes.keys
26
+ if (!attributes.include?(params[:order_field]) && @model_class.method_defined?(params[:order_field])) || @models_export.is_a?(Array)
26
27
  @models = if order == "asc"
27
28
  @models_export.sort { |m1, m2| m1.send(params[:order_field]) <=> m2.send(params[:order_field]) }
28
29
  else
@@ -296,7 +297,7 @@ module SlashAdmin
296
297
  params[:filters].each do |attr, query|
297
298
  unless query.blank?
298
299
  if virtual_fields.present? && virtual_fields.include?(attr.to_s)
299
- search = search.select { |s| s.send(attr).present? ? s.send(attr).downcase.include?(query.downcase) : nil }
300
+ search = search.select { |s| s.send(attr).present? ? s.send(attr).to_s.downcase.include?(query.downcase) : nil }
300
301
  end
301
302
  end
302
303
  end
@@ -1,3 +1,3 @@
1
1
  module SlashAdmin
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.4"
3
3
  end
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.3
4
+ version: 1.0.4
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-10-29 00:00:00.000000000 Z
11
+ date: 2019-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails