skinny_controllers 0.8.2 → 0.8.3
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 +4 -4
- data/lib/skinny_controllers/operation/default.rb +7 -4
- data/lib/skinny_controllers/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25bcf68995560fbf7e6e2e65af9c3117e1efd48e
|
4
|
+
data.tar.gz: 457cd041dac1a5e7801e0d69575445aa1dff2142
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5aca9bd1eb699be7dfd315085cce7e93adc95827fa93b70deca0ef314badde40b3ef3baf0fada82ea2a9be55a2f2b7c4a17f701cac3b7a7444605a30df1f28cc
|
7
|
+
data.tar.gz: b39e5e3d5f7b30c932baac4510a16986892474d946bda917388795286d96979a28e0d0b54e98e42c9b2a26cd51364cfcbfaeeabf2e4fd53c2e3f7ed88e065f3d
|
@@ -2,8 +2,6 @@ module SkinnyControllers
|
|
2
2
|
module Operation
|
3
3
|
class Default < Base
|
4
4
|
def run
|
5
|
-
return unless allowed?
|
6
|
-
|
7
5
|
# Note that for explicitly defined operations,
|
8
6
|
# There should be a different operation for each
|
9
7
|
# action.
|
@@ -14,8 +12,13 @@ module SkinnyControllers
|
|
14
12
|
# - EventOperations::Destroy
|
15
13
|
if creating?
|
16
14
|
@model = model_class.new(model_params)
|
17
|
-
@model.save
|
18
|
-
|
15
|
+
@model.save if allowed?
|
16
|
+
return @model
|
17
|
+
end
|
18
|
+
|
19
|
+
return unless allowed?
|
20
|
+
|
21
|
+
if updating?
|
19
22
|
model.update(model_params)
|
20
23
|
elsif destroying?
|
21
24
|
model.destroy
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: skinny_controllers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- L. Preston Sego III
|
@@ -234,6 +234,6 @@ rubyforge_project:
|
|
234
234
|
rubygems_version: 2.6.4
|
235
235
|
signing_key:
|
236
236
|
specification_version: 4
|
237
|
-
summary: SkinnyControllers-0.8.
|
237
|
+
summary: SkinnyControllers-0.8.3
|
238
238
|
test_files: []
|
239
239
|
has_rdoc:
|