Flowdock
method

commit_flash

Importance_0
v5.1.7 - Show latest stable - 0 notes - Class: RequestMethods
commit_flash() public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 59
      def commit_flash # :nodoc:
        session    = self.session || {}
        flash_hash = self.flash_hash

        if flash_hash && (flash_hash.present? || session.key?("flash"))
          session["flash"] = flash_hash.to_session_value
          self.flash = flash_hash.dup
        end

        if (!session.respond_to?(:loaded?) || session.loaded?) && # (reset_session uses {}, which doesn't implement #loaded?)
            session.key?("flash") && session["flash"].nil?
          session.delete("flash")
        end
      end
Register or log in to add new notes.