You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.
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
end
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.
I'm wondering why we cannot (or should not) pass in additional parameters to can?, eg
can? :manage, result, arbitrary_parameter1, arbitrary_parameter2
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
The text was updated successfully, but these errors were encountered: