motor-admin 0.2.20 → 0.2.24

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: 35d64da7a1fa64e919972e887faa99359d26015badb611b4c98cc55cd7f4d683
4
- data.tar.gz: 9eb96163006387d2edd1edd76a406fd7ff4b9aa42bdeabc0de093555935e10e2
3
+ metadata.gz: 676aa441a86219350a066d51023aa10a7765c93dd155008feca17a76eec74177
4
+ data.tar.gz: 83c5d373aac0a44407c8f805ea01aee8d8e178802f0efc22121c879e3885d9b6
5
5
  SHA512:
6
- metadata.gz: af7ab14732dbbc23938303030fc42b8c2446c3ee9c5ad782967e37a5acd2b12b45799617e31dd128ece07e654df024a1e8eedd43969f515a42187430ad3b757d
7
- data.tar.gz: 48276612be7ad9ac6bcae839a2459d2645d69fccb921f8505bf33009d963f6f1cfb8336d214d831ccb9017fb805debb448e37aefebace7fe02eded32fb033afb
6
+ metadata.gz: fbd445e4805615320ed932974aac218d7ae2092c8751d18762e36550139027cb2f683006c4e419c4f21fff230e3e4c5c6dc837cbb682361b09e9c7ed285a8be8
7
+ data.tar.gz: 0c5b84920c042f7a55353b6c4e6e9f43366bbc2b044cdd9e6924eddcdcf8b7caf1224c17040bb7003710935528608ff6f83aec9bba9fd8e9cff66920e10b7e4c
@@ -4,7 +4,7 @@ module Motor
4
4
  module CurrentAbility
5
5
  def current_ability
6
6
  @current_ability ||=
7
- if defined?(Motor::Ability) && current_user
7
+ if defined?(Motor::Ability)
8
8
  klass = Motor::Ability.dup.tap do |k|
9
9
  k.prepend(Motor::CancanUtils::AbilityPatch)
10
10
  end
@@ -276,3 +276,5 @@ en:
276
276
  user_dropdown: User dropdown
277
277
  upload: Upload
278
278
  there_is_nothing_here_yet: There is nothing here yet 🤷‍♂️
279
+ is_null: Is null
280
+ is_not_null: Is not null
@@ -276,6 +276,8 @@ es:
276
276
  user_dropdown: Despliegue del usuario
277
277
  upload: Subir a
278
278
  there_is_nothing_here_yet: Todavía no hay nada aquí 🤷‍♂️
279
+ is_null: Es nulo
280
+ is_not_null: No es nulo
279
281
  i:
280
282
  locale: es
281
283
  select:
@@ -272,6 +272,8 @@ pt:
272
272
  user_dropdown: Desistência do utilizador
273
273
  upload: Carregar
274
274
  there_is_nothing_here_yet: Ainda não há nada aqui 🤷‍♂️
275
+ is_null: É nulo
276
+ is_not_null: Não é nulo
275
277
  i:
276
278
  locale: pt
277
279
  select:
@@ -67,6 +67,10 @@ module Motor
67
67
  ['ilike', value.sub(LIKE_FILTER_VALUE_REGEXP, '\1%')]
68
68
  when 'ends_with'
69
69
  ['ilike', value.sub(LIKE_FILTER_VALUE_REGEXP, '%\1')]
70
+ when 'eqnull'
71
+ ['eq', nil]
72
+ when 'neqnull'
73
+ ['neq', nil]
70
74
  else
71
75
  [action, value]
72
76
  end
@@ -142,7 +142,10 @@ module Motor
142
142
 
143
143
  return { select_options: enum.keys } if enum
144
144
 
145
- return { number_format: true } if !column.name.ends_with?('_id') && %i[integer float].include?(column.type)
145
+ return {} if column.name == 'year'
146
+
147
+ return { number_format: true } if !column.name.match?(/_(?:id|year)\z/) &&
148
+ %i[integer float].include?(column.type)
146
149
 
147
150
  {}
148
151
  end
@@ -157,7 +157,7 @@ module Motor
157
157
  expresion = table.project(table[Arel.star])
158
158
  expresion = expresion.where(arel_filters) if arel_filters.present?
159
159
 
160
- expresion.take(limit.to_i).to_sql
160
+ expresion.take(limit.to_i).to_sql.delete('"')
161
161
  end
162
162
 
163
163
  # @param filters [Hash]
data/lib/motor/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Motor
4
- VERSION = '0.2.20'
4
+ VERSION = '0.2.24'
5
5
  end
@@ -2601,9 +2601,9 @@
2601
2601
  "icons/zoom-out.svg.gz": "icons/zoom-out.svg.gz",
2602
2602
  "icons/zoom-question.svg": "icons/zoom-question.svg",
2603
2603
  "icons/zoom-question.svg.gz": "icons/zoom-question.svg.gz",
2604
- "main-3053b6cb9c0fbea51e36.css.gz": "main-3053b6cb9c0fbea51e36.css.gz",
2605
- "main-3053b6cb9c0fbea51e36.js.LICENSE.txt": "main-3053b6cb9c0fbea51e36.js.LICENSE.txt",
2606
- "main-3053b6cb9c0fbea51e36.js.gz": "main-3053b6cb9c0fbea51e36.js.gz",
2607
- "main.css": "main-3053b6cb9c0fbea51e36.css",
2608
- "main.js": "main-3053b6cb9c0fbea51e36.js"
2604
+ "main-8421aae2289372e89a1d.css.gz": "main-8421aae2289372e89a1d.css.gz",
2605
+ "main-8421aae2289372e89a1d.js.LICENSE.txt": "main-8421aae2289372e89a1d.js.LICENSE.txt",
2606
+ "main-8421aae2289372e89a1d.js.gz": "main-8421aae2289372e89a1d.js.gz",
2607
+ "main.css": "main-8421aae2289372e89a1d.css",
2608
+ "main.js": "main-8421aae2289372e89a1d.js"
2609
2609
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motor-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.20
4
+ version: 0.2.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pete Matsyburka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-08 00:00:00.000000000 Z
11
+ date: 2021-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord-filter
@@ -1525,8 +1525,8 @@ files:
1525
1525
  - ui/dist/icons/zoom-money.svg.gz
1526
1526
  - ui/dist/icons/zoom-out.svg.gz
1527
1527
  - ui/dist/icons/zoom-question.svg.gz
1528
- - ui/dist/main-3053b6cb9c0fbea51e36.css.gz
1529
- - ui/dist/main-3053b6cb9c0fbea51e36.js.gz
1528
+ - ui/dist/main-8421aae2289372e89a1d.css.gz
1529
+ - ui/dist/main-8421aae2289372e89a1d.js.gz
1530
1530
  - ui/dist/manifest.json
1531
1531
  homepage:
1532
1532
  licenses: