undercarriage 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/undercarriage/controllers/action_concern.rb +16 -0
- data/lib/undercarriage/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: 5bfccc91ecab39aec340c24709817eddbee2ae225a893d2f721f0696080f5680
|
4
|
+
data.tar.gz: 9183a706e4744f7a1e54625ed3449975ac89dea2ce118c11d82b346a15ff0637
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c20a00b93e8a251e0a399c8a30e9c67ca0424630bd231cfb52c30fc411bc6c087cf3d2a0e0e39f143933ff3ac11e0940e802fe7d05470804457e4c653bdc327b
|
7
|
+
data.tar.gz: a9c25f95f2adcd1cff72bff54798f92ae9d761744847d088ef1ae17464908c6f6c221411c7062df5e6cd3d19183616ca441c5051fc419acb767609c1a2c1666c
|
@@ -21,6 +21,7 @@ module Undercarriage
|
|
21
21
|
:collection_action?,
|
22
22
|
:create_action?,
|
23
23
|
:create_actions?,
|
24
|
+
:destroy_action?,
|
24
25
|
:edit_action?,
|
25
26
|
:edit_actions?,
|
26
27
|
:index_action?,
|
@@ -139,6 +140,21 @@ module Undercarriage
|
|
139
140
|
action?('update')
|
140
141
|
end
|
141
142
|
|
143
|
+
##
|
144
|
+
# Check if destroy
|
145
|
+
#
|
146
|
+
# Check if action is the destroy action type. The check will pass if it is a `destroy` action
|
147
|
+
#
|
148
|
+
# Usage
|
149
|
+
# destroy_action? # true
|
150
|
+
# destroy_action? # false
|
151
|
+
#
|
152
|
+
# @return [Boolean] if action is action type
|
153
|
+
#
|
154
|
+
def destroy_action?
|
155
|
+
action?('destroy')
|
156
|
+
end
|
157
|
+
|
142
158
|
##
|
143
159
|
# Check if collection
|
144
160
|
#
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: undercarriage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Freerksen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|