123456789_123456789_123456789_123456789_123456789_

Module: ActionController::Flash

Relationships & Source Files
Namespace Children
Modules:
Extension / Inclusion / Inheritance Descendants
Included In:
Base, ::ActionView::TestCase::TestController, Rails::ApplicationController, Rails::InfoController, Rails::MailersController, Rails::WelcomeController
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Defined in: actionpack/lib/action_controller/metal/flash.rb

Class Method Summary

Instance Method Summary

DSL Calls

included

[ GitHub ]


5
6
7
8
9
10
11
# File 'actionpack/lib/action_controller/metal/flash.rb', line 5

included do
  class_attribute :_flash_types, instance_accessor: false
  self._flash_types = []

  delegate :flash, to: :request
  add_flash_types(:alert, :notice)
end

Instance Method Details

#redirect_to(options = {}, response_status_and_flash = {}) (protected)

[ GitHub ]

  
# File 'actionpack/lib/action_controller/metal/flash.rb', line 46

def redirect_to(options = {}, response_status_and_flash = {}) #:doc:
  self.class._flash_types.each do |flash_type|
    if type = response_status_and_flash.delete(flash_type)
      flash[flash_type] = type
    end
  end

  if other_flashes = response_status_and_flash.delete(:flash)
    flash.update(other_flashes)
  end

  super(options, response_status_and_flash)
end