Skip to content


can? with additional parameters #48

campbell opened this Issue · 2 comments

3 participants


I'm wondering why we cannot (or should not) pass in additional parameters to can?, eg
can? :manage, result, arbitrary_parameter1, arbitrary_parameter2

can :manage, Result do |action, result, arb_param1, arb_param2|
  arb_param1 == 'blue' || arb_param2 == 42

This seems like a more flexible version of Accessing Request Data because the arbitrary parameters don't have to be included in the ApplicationController code.

Gist example of CAN? with arbitrary parameters


That's a good suggestion, and considering the number of votes I can see others are interested in seeing this. I'll work on bringing this behavior in.


Have this feature implemented? I need exactly the same functionality.

@rweng rweng referenced this issue from a commit in arcanio/cancan
@phallguy phallguy Cleaning up for @bryanrite #48 11dae7c
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.