Naming Nested Templates Custom Template Engines Directory A template is a file that describes the body of a response. It is rendered by bounding the context of a view and us...
Requests Handling View Rendering Bypass Rendering Initialization Requests Handling In the previous section , we generated an action. Now let’s use it. First, we check our r...
Actions Actions In a Hanami application, actions are responsible for handling HTTP requests. Actions decide what HTTP response your application returns for a given request - it...
Sender & Recipient Locals Scope In the previous section , we generated a mailer, let’s use it. Sender & Recipient Firstly, we need to specify sender and recipient(s) and the...
Using sessions Session adapters Sessions are disabled by default. To enable sessions, add a config like the following to your app: # config/app.rb module Bookshelf ...
Cookie configuration Removing cookies Disabling cookies Actions can set cookies on outgoing requests via the response object. module Bookshelf module Actions ...
Basic usage Logging data Logging exceptions Hanami logger is compatible with the stdlib Logger but it supports structured logging by default. This means that you are encourag...
Default Rendering View For Specific Format A view can handle several MIME Types. Before diving into this subject, please consider to read how actions handle MIME Types . It’s ...
Environment Example Test / Spec Ruby Server Hosting Ecosystem Compatibility Custom rake tasks Hanami ships with default Rake tasks that can be used as prerequisites by devel...