kemalcr / kemal

Fast, Effective, Simple Web Framework

Home Page:https://kemalcr.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing helpers method to define helper methods for use in route handlers and templates

drum445 opened this issue · comments

commented

Not a bug, just a query really. In Sinatra it has a helpers method where we can add any custom helpers we may have, I used this a lot for is_logged_in, etc...

In Kemal is the idea we would just have a file of these anonymous functions, as when called from a route we will still be in the request's scope gate and can access all the methods/vars we would expect (request, session, etc...) ? This is of course, also possibly in Ruby, but the explicit helpers method Sinatra provides helps keep things more explicit without leaking scope.

Many Thanks.