Class: ActionController::Filters::ClassMethods::BeforeFilterProxy

Inherits:
FilterProxy show all
Defined in:
lib/action_controller/filters.rb

Overview

:nodoc:

Instance Attribute Summary

Attributes inherited from Filter

#excluded_actions, #filter, #included_actions

Instance Method Summary collapse

Methods inherited from FilterProxy

#filter

Methods inherited from Filter

#after?, #around?, #before?, #initialize

Constructor Details

This class inherits a constructor from ActionController::Filters::ClassMethods::Filter

Instance Method Details

#call(controller) ⇒ Object



447
448
449
# File 'lib/action_controller/filters.rb', line 447

def call(controller)
  yield unless run(controller)
end

#run(controller) ⇒ Object



439
440
441
442
443
444
445
# File 'lib/action_controller/filters.rb', line 439

def run(controller)
  # only filters returning false are halted.
  @filter.call(controller)
  if controller.send!(:performed?)
    controller.send!(:halt_filter_chain, @filter, :rendered_or_redirected)
  end
end

#typeObject



435
436
437
# File 'lib/action_controller/filters.rb', line 435

def type
  :before
end