Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
drum445 opened this issue Feb 7, 2022 · 0 comments

Comments

@drum445
Copy link

drum445 commented Feb 7, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant