Session support in actions without requiring app/slice-level session config

Open
#18 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Domain
backend

Research direction

Start by reviewing how Rack sessions are enabled in routes and how config.actions.sessions is handled in the app or slice, then read related issue #4. Done requires a decided approach for enabling session support in actions without redundant configuration, with the behavior and configuration documented and covered by appropriate tests.

Written by the indexing model from the issue text.

Description

It's possible to enable rack sessions by use-ing the middleware directly in your routes.

But actions won't get session support until you configure config.actions.sessions inside your app/slice.

I feel like it should be possible to either (a) enable session support always (perhaps it's harmless if not needed) or (b) simplify the config to enable sessions in actions, e.g. config.actions.sessions = true if you know you're enabling sessions elsewhere.

Related: #4

Dominant language
No language data
Stars
3
Forks
0
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from hanami/roadmap

All issues in hanami/roadmap

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.