Class: ActionController::Filters::BeforeFilter

Inherits:
Filter
  • Object
show all
Defined in:
lib/action_controller/filters.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods inherited from Filter

#after?, #around?, #initialize, #update_options!

Constructor Details

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

Instance Method Details

#before?Boolean

Returns:

  • (Boolean)


220
221
222
# File 'lib/action_controller/filters.rb', line 220

def before?
  true
end

#call(controller, &block) ⇒ Object



224
225
226
227
228
229
# File 'lib/action_controller/filters.rb', line 224

def call(controller, &block)
  super
  if controller.__send__(:performed?)
    controller.__send__(:halt_filter_chain, method, :rendered_or_redirected)
  end
end

#typeObject



216
217
218
# File 'lib/action_controller/filters.rb', line 216

def type
  :before
end