Module: ActionController::PolicyContext
- Defined in:
- lib/action_controller/policy_context.rb
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/action_controller/policy_context.rb', line 3 def self.included base base.class_eval do include ActiveModel::PolicyContext policy_context :current_user end methods = ActiveModel::PolicyContext.instance_methods base.hide_action *methods base.helper_method :can?, :cannot? end |