module Pundit
@api public
Constants
- SUFFIX
- VERSION
Public Class Methods
included(base)
click to toggle source
# File lib/pundit.rb, line 63 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
policy(user, *args, **kwargs, &block)
click to toggle source
@see [Pundit::Context#policy]
# File lib/pundit.rb, line 95 def policy(user, *args, **kwargs, &block) Context.new(user: user).policy(*args, **kwargs, &block) end
policy!(user, *args, **kwargs, &block)
click to toggle source
@see [Pundit::Context#policy!]
# File lib/pundit.rb, line 100 def policy!(user, *args, **kwargs, &block) Context.new(user: user).policy!(*args, **kwargs, &block) end
policy_scope(user, *args, **kwargs, &block)
click to toggle source
@see [Pundit::Context#policy_scope]
# File lib/pundit.rb, line 85 def policy_scope(user, *args, **kwargs, &block) Context.new(user: user).policy_scope(*args, **kwargs, &block) end
policy_scope!(user, *args, **kwargs, &block)
click to toggle source
@see [Pundit::Context#policy_scope!]
# File lib/pundit.rb, line 90 def policy_scope!(user, *args, **kwargs, &block) Context.new(user: user).policy_scope!(*args, **kwargs, &block) end