Sha256: f575383a9bce9b089bac8c77c6f5dcacf71526cac1833cf4de968ff7e3e69930

Contents?: true

Size: 730 Bytes

Versions: 224

Compression:

Stored size: 730 Bytes

Contents

module ActionController #:nodoc:
  module Flash
    extend ActiveSupport::Concern

    included do
      delegate :flash, :to => :request
      delegate :alert, :notice, :to => "request.flash"
      helper_method :alert, :notice
    end

    protected
      def redirect_to(options = {}, response_status_and_flash = {}) #:doc:
        if alert = response_status_and_flash.delete(:alert)
          flash[:alert] = alert
        end

        if notice = response_status_and_flash.delete(:notice)
          flash[:notice] = notice
        end

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

        super(options, response_status_and_flash)
      end
  end
end

Version data entries

224 entries across 185 versions & 18 rubygems

Version Path
actionpack-3.2.14.rc1 lib/action_controller/metal/flash.rb
swipe-rails-0.0.5 vendor/bundle/gems/actionpack-3.2.13/lib/action_controller/metal/flash.rb
active_mailer-0.0.9 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.12/lib/action_controller/metal/flash.rb
active_mailer-0.0.8 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.12/lib/action_controller/metal/flash.rb
active_mailer-0.0.7 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.12/lib/action_controller/metal/flash.rb
active_mailer-0.0.6 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.12/lib/action_controller/metal/flash.rb
font-awesome-rails-3.1.1.2 vendor/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_controller/metal/flash.rb
font-awesome-rails-3.1.1.2 vendor/ruby/1.9.1/gems/actionpack-3.2.12/lib/action_controller/metal/flash.rb
font-awesome-rails-3.1.1.2 vendor/ruby/2.0.0/gems/actionpack-3.2.12/lib/action_controller/metal/flash.rb
font-awesome-rails-3.1.1.1 vendor/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_controller/metal/flash.rb
font-awesome-rails-3.1.1.1 vendor/ruby/2.0.0/gems/actionpack-3.2.12/lib/action_controller/metal/flash.rb
font-awesome-rails-3.1.1.1 vendor/ruby/1.9.1/gems/actionpack-3.2.12/lib/action_controller/metal/flash.rb
challah-1.0.0.beta3 vendor/bundle/gems/actionpack-3.2.13/lib/action_controller/metal/flash.rb
fc-webicons-0.0.4 vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_controller/metal/flash.rb
challah-1.0.0.beta2 vendor/bundle/gems/actionpack-3.2.13/lib/action_controller/metal/flash.rb
challah-1.0.0.beta vendor/bundle/gems/actionpack-3.2.13/lib/action_controller/metal/flash.rb
challah-1.0.0.beta vendor/bundle/gems/actionpack-3.2.11/lib/action_controller/metal/flash.rb
fc-webicons-0.0.3 vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_controller/metal/flash.rb
fc-webicons-0.0.2 vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_controller/metal/flash.rb
fc-webicons-0.0.1 vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_controller/metal/flash.rb