Authorization [WIP]
Example 1: Pundit
class UserPolicy
attr_reader :user
def initialize(user)
@user = user
end
def show?
user.is_visible?
end
endExample 2: CanCanCan
Last updated
Was this helpful?