expose_authorization_rules with custom context
AlexeyAbdulmanov opened this issue · 0 comments
AlexeyAbdulmanov commented
Hi, can I transfer some additional data to expose_authorization_rules and then use them in the policy?
for example:
expose_authorization_rules :create?, context: { test_data: "I'm test_data" }
then get this information in the policy for use
def create?
self.context[:test_data]
end