Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

skip_load_and_authorize_resource does not raises any exception. #745

Open
wants to merge 1 commit into from

3 participants

@Serabe

Previously, skip_load_and_authorize_resource raised implementation exceptions due to deprecation of skip_load_resource and skip_authorize_resource.

Implementation's been moved up from these methods to skip_load_and_authorize_resource.

This should fix issue #465

@brupm

+1

@xhoy

Dear submitter, Since cancan/raynB hasn't been active for more than 6 months and no body else then ryam himself has commit permissions the cancan project is on a stand still.
Since cancan has several issues including missing support for rails 4 cancan is moving forward to cancancan. More details on: #994

If your feel that your pull request or bug is still applicable (and hasn't been merged in to cancan) it would be really appreciated if you would resubmit it to cancancan (https://github.com/cancancommunity/cancancan)

We hope to see you on the other side!

@xhoy

Dear submitter, Since cancan/raynB hasn't been active for more than 6 months and no body else then ryam himself has commit permissions the cancan project is on a stand still.
Since cancan has several issues including missing support for rails 4 cancan is moving forward to cancancan. More details on: #994

If your feel that your pull request or bug is still applicable (and hasn't been merged in to cancan) it would be really appreciated if you would resubmit it to cancancan (https://github.com/cancancommunity/cancancan)

We hope to see you on the other side!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/cancan/controller_additions.rb
View
6 lib/cancan/controller_additions.rb
@@ -187,8 +187,10 @@ def authorize_resource(*args)
#
# You can also pass the resource name as the first argument to skip that resource.
def skip_load_and_authorize_resource(*args)
- skip_load_resource(*args)
- skip_authorize_resource(*args)
+ options = args.extract_options!
+ name = args.first
+ cancan_skipper[:load][name] = options
+ cancan_skipper[:authorize][name] = options
end
# Skip the loading behavior of CanCan. This is useful when using +load_and_authorize_resource+ but want to
Something went wrong with that request. Please try again.