skinny_controllers 0.8.2 → 0.8.3

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
  SHA1:
3
- metadata.gz: d5bc252037caecc80eed0d9d1b90ba5607149773
4
- data.tar.gz: 93607ed59083f50ffa65f761a6f386a07307e4f3
3
+ metadata.gz: 25bcf68995560fbf7e6e2e65af9c3117e1efd48e
4
+ data.tar.gz: 457cd041dac1a5e7801e0d69575445aa1dff2142
5
5
  SHA512:
6
- metadata.gz: 56c48b1968618e9b0a91be46ea3670921e5c5172bc8c8d13c70e27fc4b5c7597495ee7a61e21284e64c12b87eda9fce7c432dd3b2e3dd8fd007619ed7060196a
7
- data.tar.gz: fbea2fd3428467d7f61aa966bef7cb389b7eb1de95e2cae77d92eaef89ba3417b3786077ecb4eea189a0b839743382183309c2b5e4939f9312dc0530fc4dac0a
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
- elsif updating?
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
@@ -1,3 +1,3 @@
1
1
  module SkinnyControllers
2
- VERSION = '0.8.2'.freeze
2
+ VERSION = '0.8.3'.freeze
3
3
  end
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.2
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.2
237
+ summary: SkinnyControllers-0.8.3
238
238
  test_files: []
239
239
  has_rdoc: