method

commit_flash

Importance_0
v7.0.0 - 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 61
      def commit_flash # :nodoc:
        return unless session.enabled?

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

        if session.loaded? && session.key?("flash") && session["flash"].nil?
          session.delete("flash")
        end
      end
Register or log in to add new notes.