Module: Hanami::Action::Session
- Defined in:
- gems/gems/hanami-controller-1.3.2/lib/hanami/action/session.rb,
gems/gems/hanami-controller-1.3.3/lib/hanami/action/session.rb
Overview
Session API
This module isn’t included by default.
Instance Method Summary collapse
-
#errors ⇒ Hanami::Validations::Errors
Read errors from flash or delegate to the superclass.
-
#flash ⇒ Hanami::Action::Flash
private
Container useful to transport data with the HTTP session.
-
#session ⇒ Hash
Gets the session from the request and expose it as an Hash.
Instance Method Details
#errors ⇒ Hanami::Validations::Errors
Read errors from flash or delegate to the superclass
Source: | on GitHub
def errors flash[ERRORS_KEY] || params.respond_to?(:errors) && params.errors end |
#flash ⇒ Hanami::Action::Flash (private)
Container useful to transport data with the HTTP session
Source: | on GitHub
def flash @flash ||= Flash.new(session) end |
#session ⇒ Hash
Gets the session from the request and expose it as an Hash.
Source: | on GitHub
def session @_env[SESSION_KEY] ||= {} end |