Exception: Hanami::Controller::MissingSessionError

Inherits:
Error
  • Object
show all
Defined in:
lib/hanami/controller.rb

Overview

Missing session error

This error is raised when an action sends either `session` or `flash` to itself and it does not include `Hanami::Action::Session`.

See Also:

Since:

  • 1.2.0

Instance Method Summary collapse

Constructor Details

#initialize(session_method) ⇒ MissingSessionError

Returns a new instance of MissingSessionError.

Since:

  • 1.2.0


61
62
63
# File 'lib/hanami/controller.rb', line 61

def initialize(session_method)
  super("To use `#{session_method}', add `include Hanami::Action::Session`.")
end