cancancan_resource_controller 0.0.1 → 0.0.2

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: a38bfb98462e336b34961d82c4d130022bf466971f55c11699e707b7e6ce4fff
4
- data.tar.gz: aa0be9ebb6885fc7b15156d0517f1df7c236c3da081a8cf01f6e5b3bf1b456ba
3
+ metadata.gz: 2b99718f6d48907515dff8a39fd93995f044a4bb085ab7113efeea26e0273ad3
4
+ data.tar.gz: 46c90e5bf82f050e4772018508e594d1ebaa8e04b33268b332c4c0ded334583d
5
5
  SHA512:
6
- metadata.gz: 565013e091449c0a17c33413b7c2c7be15bb660ec644cda55db34df9310cdb7a3b94a3639b256df1745390b1cebc976d121eae3efe39bfe85954f75ef6a4af55
7
- data.tar.gz: d7b727d66c11e8cf171e2eb6ba0f5175740b8be186ef0e463782e0a619951ccffca6f83fa4a50576d6ebf406629b77a840f74a5ad57b1344ea20fdce8eb3ddd9
6
+ metadata.gz: 4e19a473a79d8f349c304f820ee6678180d805cf3c565f6dc71fd779613e6d200563ba8192a17f8a1eac8e676df6346266f8937900f162183485dfe39b96e4ec
7
+ data.tar.gz: 0c039d6dd0f6397f43a2661a38c2646a2e807105f8f85cd221c611b54c16bb5a739ddc4d2e1c706b25d8c3dc899dd5ae0453b1024328fea39f110602f02417cb
@@ -189,7 +189,6 @@ module CanCanCan
189
189
  @resource ||= @resource_class.find(params[:id])
190
190
  authorize! :destroy, @resource
191
191
  # retuning the resource in a pre-destroyed state as a destroy response
192
- results = @resource
193
192
  if @resource.destroy
194
193
  respond_after_destroy
195
194
  else
@@ -237,7 +236,7 @@ module CanCanCan
237
236
  def respond_after_destroy
238
237
  respond_to do |format|
239
238
  format.html { redirect_to url_for(controller: controller_name, action: 'index') }
240
- format.json { render json: results, status: :no_content }
239
+ format.json { render json: @resource, status: :no_content }
241
240
  end
242
241
  end
243
242
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cancancan_resource_controller
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - benjamin.dana.software.dev@gmail.com
@@ -141,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
141
  - !ruby/object:Gem::Version
142
142
  version: '0'
143
143
  requirements: []
144
- rubygems_version: 3.3.7
144
+ rubygems_version: 3.4.15
145
145
  signing_key:
146
146
  specification_version: 4
147
147
  summary: A Rails Controller Module that uses CanCan's permitted attribs instead of