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.