Questions tagged [hanami-router]

Hanami::Router is a Rack compatible, lightweight and fast HTTP Router for Ruby and Hanami.

4 questions
5
votes
1 answer

How to use lotus router with Rack::Builder::map

Is there a way to use map and the (lotus)router namespacing together? Below is a sample config.ru I'm trying to get running as a demo. require 'bundler' Bundler.require module Demo class Application def initialize @app =…
Krut
  • 4,112
  • 3
  • 34
  • 42
2
votes
1 answer

Hanami : access current page URL from views or templates

I'm discovering Hanami those days (Hanami 1.3), I'm polishing the test project I've worked on, and I can't find a way to access the current page url/path from a view or a template (the idea is handling the navigation links visual state, as you may…
Pierre-Adrien
  • 2,836
  • 29
  • 30
2
votes
2 answers

Hanami routes helper don't work in templates

I have hanami application version 1.0.0 I have next routes.rb file: get '/games', to: 'games#index' root to: 'home#index' I read docs and tried to use <%= routes.games_path %> in application.html.erb template, but recieved next…
synacker
  • 1,722
  • 13
  • 32
-1
votes
1 answer

How to get the `hanami routes` command to include additional objects

The overview documentation for routes has examples of objects being used for route resolution such as get '/rack-app', to: RackApp.new, which work as documented with code like: options '/*', to: MyApp::CORSRequestHandler.new From the console and…