Class: ActionController::Filters::FilterChain

Inherits:
ActiveSupport::Callbacks::CallbackChain show all
Defined in:
actionpack/lib/action_controller/filters.rb

Overview

:nodoc:

Instance Method Summary (collapse)

Methods inherited from ActiveSupport::Callbacks::CallbackChain

build, #delete, #find, #replace_or_append!, #run

Methods inherited from Array

#as_json, #to_json

Methods included from ActiveSupport::CoreExtensions::Array::Wrapper

#wrap

Methods included from ActiveSupport::CoreExtensions::Array::RandomAccess

#rand, #random_element

Methods included from ActiveSupport::CoreExtensions::Array::Grouping

#in_groups, #in_groups_of, #split

Methods included from ActiveSupport::CoreExtensions::Array::ExtractOptions

#extract_options!

Methods included from ActiveSupport::CoreExtensions::Array::Conversions

included, #to_formatted_s, #to_param, #to_query, #to_sentence, #to_xml

Methods included from ActiveSupport::CoreExtensions::Array::Access

#fifth, #forty_two, #fourth, #from, #second, #third, #to

Instance Method Details

- (Object) append_filter_to_chain(filters, filter_type, &block)



11
12
13
14
# File 'actionpack/lib/action_controller/filters.rb', line 11

def append_filter_to_chain(filters, filter_type, &block)
  pos = find_filter_append_position(filters, filter_type)
  update_filter_chain(filters, filter_type, pos, &block)
end

- (Object) create_filters(filters, filter_type, &block)



21
22
23
24
25
# File 'actionpack/lib/action_controller/filters.rb', line 21

def create_filters(filters, filter_type, &block)
  filters, conditions = extract_options(filters, &block)
  filters.map! { |filter| find_or_create_filter(filter, filter_type, conditions) }
  filters
end

- (Object) prepend_filter_to_chain(filters, filter_type, &block)



16
17
18
19
# File 'actionpack/lib/action_controller/filters.rb', line 16

def prepend_filter_to_chain(filters, filter_type, &block)
  pos = find_filter_prepend_position(filters, filter_type)
  update_filter_chain(filters, filter_type, pos, &block)
end

- (Object) skip_filter_in_chain(*filters, &test)



27
28
29
30
31
32
33
# File 'actionpack/lib/action_controller/filters.rb', line 27

def skip_filter_in_chain(*filters, &test)
  filters, conditions = extract_options(filters)
  filters.each do |filter|
    if callback = find(filter) then delete(callback) end
  end if conditions.empty?
  update_filter_in_chain(filters, :skip => conditions, &test)
end