module Pundit
Hello? Yes, this is Pundit
.
@api public
Constants
- SUFFIX
-
@api private @deprecated See {Pundit::PolicyFinder}
- VERSION
-
The current version of
Pundit
.
Public Class Methods
Source
# File lib/pundit.rb, line 83 def self.included(base) location = caller_locations(1, 1).first warn <<~WARNING 'include Pundit' is deprecated. Please use 'include Pundit::Authorization' instead. (called from #{location.label} at #{location.path}:#{location.lineno}) WARNING base.include Authorization end
Source
# File lib/pundit.rb, line 116 def policy(user, *args, **kwargs, &block) Context.new(user: user).policy(*args, **kwargs, &block) end
Source
# File lib/pundit.rb, line 121 def policy!(user, *args, **kwargs, &block) Context.new(user: user).policy!(*args, **kwargs, &block) end
Source
# File lib/pundit.rb, line 106 def policy_scope(user, *args, **kwargs, &block) Context.new(user: user).policy_scope(*args, **kwargs, &block) end
Source
# File lib/pundit.rb, line 111 def policy_scope!(user, *args, **kwargs, &block) Context.new(user: user).policy_scope!(*args, **kwargs, &block) end