hanami / controller

Complete, fast and testable actions for Rack and Hanami

Home Page:http://hanamirb.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make `Hanami::Action::{Request,Response}` `#session` and `#flash` to raise `Hanami::Controller::MissingSessionError` when session is not configured

jodosha opened this issue · comments

With #250 (v1.2.0) we introduced a new exception (Hanami::Controller::MissingSessionError) which is raised when a dev tries to access Action#session and Action#flash when the HTTP session isn't configured.

In 2.0 (unstable branch), the access to session and flash will be moved from Hanami::Action to Hanami::Action::Request and Response. These two objects need to support the old behavior of raising a Hanami::Controller::MissingSessionError.


This change IS for unstable branch.


Ref #250

Sorry, that was the wrong click 😄

Fixed in #379.