motor-admin 0.4.24 → 0.4.26

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: 073751c55b6f68c411439fa4dfde30a04318eff7a6a1764f4aea09c92998cb17
4
- data.tar.gz: dd7bd5c8314c137e91cde7cfaa3f2809f645f914ae227c276e1571949388d828
3
+ metadata.gz: c3d3f74d751d9aab63f2752c05ce5e2505211f1fc9f5a1e70d261e12f6bc2717
4
+ data.tar.gz: 2635bb819b6c3914e9a043322b0e9796401c5c094b818aa396e2a712868ef0b5
5
5
  SHA512:
6
- metadata.gz: 2f50cc4819a6d9a3bd6ac0f1b386e969cf3e829cdf7f110cb6273f50cbed459443dfc990e4f7888755f5e9bdcefe71436cfe69ef777da161b3cd2a7634d3cea5
7
- data.tar.gz: '0095cfc6d0746bf614b79e2345ce5d70df2d4c848c8107d197f2ee6ae3b7eabbd08284360af0639434ac040228b4dd456cd95674b4c4062189fa92f6f0dc6d1a'
6
+ metadata.gz: b271b04762f0fcf0e123a7eb1275bd08c94e99d3e6c5cf4cc37282ccc05934afaf05dc428c2e0a62db4bdd80b014a1f4f100329a4c7789c604ebaf8abc689b5a
7
+ data.tar.gz: bd88869c1cd00d8e655f7b4169da380e1b649e5f0f128c9a95adf6a86438c433e09b2f666deaa7ae25b51ef8b593a9f66369d79ea24d2f0bc682c326d7e8f993
@@ -55,6 +55,8 @@ module Motor
55
55
  def destroy
56
56
  if @resource.respond_to?(:deleted_at)
57
57
  @resource.update(deleted_at: Time.current)
58
+ elsif @resource.respond_to?(:archived_at)
59
+ @resource.update(archived_at: Time.current)
58
60
  else
59
61
  @resource.destroy!
60
62
  end
@@ -9,7 +9,11 @@ module Motor
9
9
 
10
10
  def all
11
11
  ActiveRecord::Base.logger.silence do
12
- CACHE_STORE.fetch(Motor::Alert.all.maximum(:updated_at)) do
12
+ cache_key = Motor::Alert.all.maximum(:updated_at)
13
+
14
+ return [] if cache_key.nil?
15
+
16
+ CACHE_STORE.fetch(cache_key) do
13
17
  clear
14
18
 
15
19
  Motor::Alert.all.active.enabled.to_a
@@ -61,8 +61,6 @@ module Motor
61
61
  # @param filters [Hash]
62
62
  # @return [ActiveRecord::Result]
63
63
  def execute_query(query, limit, variables_hash, filters)
64
- result = nil
65
-
66
64
  connection_class = fetch_connection_class(query)
67
65
 
68
66
  statement = prepare_sql_statement(connection_class, query, limit, variables_hash, filters)
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.4.24'
4
+ VERSION = '0.4.26'
5
5
  end
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.4.24
4
+ version: 0.4.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pete Matsyburka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-25 00:00:00.000000000 Z
11
+ date: 2024-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ar_lazy_preload
@@ -2265,7 +2265,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
2265
2265
  - !ruby/object:Gem::Version
2266
2266
  version: '0'
2267
2267
  requirements: []
2268
- rubygems_version: 3.5.3
2268
+ rubygems_version: 3.4.10
2269
2269
  signing_key:
2270
2270
  specification_version: 4
2271
2271
  summary: Low-code Admin panel and Business intelligence