motor-admin 0.2.38 → 0.2.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e6e16012b7ce3915ee63ecd0cea05e5e6ffcfdb0857ce84c14c63a4dc820cfd4
4
- data.tar.gz: 0fb8b4d2530d8be7374bcc259ef8121d00b6b8b6d4ab9a9a2e267e065c4f400f
3
+ metadata.gz: 7e3ce846e29191c7486d32cd8fb4e06596d73e11d46e8d34d93094c6407c9efa
4
+ data.tar.gz: 6b875912c05b215c6a7407b64658d51ed2d035925a4816ef8d5c50e3cbe59a59
5
5
  SHA512:
6
- metadata.gz: 2474f67c79769094f43fdd9ebbae6f9e4676073b38c2a286bd4de9370135c8cc51e0a8f9c39b1a62a20fd1d55720a52eb50cdfa1751b84c73098510a1bcea457
7
- data.tar.gz: ee04d0287e06a9710e1a1bdd379041236754e6f8a6b4b3abd4b037443049e2ae74ea474be0361d3ff3fd464fa54354bb0d36dcecf6df5d0c8f72bccc585c20b7
6
+ metadata.gz: d5ec9f6d2f97ac583f17b1948c9488f7df31a2b6e85789d2f8877d623c8d9a2403712dde886ff4855061661f9f8af431619727693175d7da05753ba3dd2bbbe1
7
+ data.tar.gz: 6737e74641f4ae7fb60845757f8741bbb082a001f44bf0933c8795157f76b513462e3e38d36de04229e8a5bc16dfbd9217a50ddda70752b223503a367405902e
@@ -87,9 +87,9 @@ module Motor
87
87
 
88
88
  def name_already_exists?(alert)
89
89
  if alert.new_record?
90
- Alert.exists?(name: alert.name)
90
+ Alert.exists?(name: alert.name, deleted_at: nil)
91
91
  else
92
- Alert.exists?(['name = ? AND id != ?', alert.name, alert.id])
92
+ Alert.exists?(['name = ? AND id != ? AND deleted_at IS NULL', alert.name, alert.id])
93
93
  end
94
94
  end
95
95
  end
@@ -63,9 +63,9 @@ module Motor
63
63
 
64
64
  def title_already_exists?(dashboard)
65
65
  if dashboard.new_record?
66
- Motor::Dashboard.exists?(title: dashboard.title)
66
+ Motor::Dashboard.exists?(title: dashboard.title, deleted_at: nil)
67
67
  else
68
- Motor::Dashboard.exists?(['title = ? AND id != ?', dashboard.title, dashboard.id])
68
+ Motor::Dashboard.exists?(['title = ? AND id != ? AND deleted_at IS NULL', dashboard.title, dashboard.id])
69
69
  end
70
70
  end
71
71
  end
@@ -63,9 +63,9 @@ module Motor
63
63
 
64
64
  def name_already_exists?(form)
65
65
  if form.new_record?
66
- Motor::Form.exists?(['name = ?', form.name])
66
+ Motor::Form.exists?(['name = ? AND deleted_at IS NULL', form.name])
67
67
  else
68
- Motor::Form.exists?(['name = ? AND id != ?', form.name, form.id])
68
+ Motor::Form.exists?(['name = ? AND id != ? AND deleted_at IS NULL', form.name, form.id])
69
69
  end
70
70
  end
71
71
  end
@@ -63,9 +63,9 @@ module Motor
63
63
 
64
64
  def name_already_exists?(query)
65
65
  if query.new_record?
66
- Query.exists?(name: query.name)
66
+ Query.exists?(name: query.name, deleted_at: nil)
67
67
  else
68
- Query.exists?(['name = ? AND id != ?', query.name, query.id])
68
+ Query.exists?(['name = ? AND id != ? AND deleted_at IS NULL', query.name, query.id])
69
69
  end
70
70
  end
71
71
  end
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.38'
4
+ VERSION = '0.2.39'
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.2.38
4
+ version: 0.2.39
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-12-19 00:00:00.000000000 Z
11
+ date: 2021-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord-filter