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
A question re r18n and haml templates with Sinatra #66
Comments
Use something link this (it isn’t optimized, but you can understand logic): |
you could even override |
I almost have it but it's not quite working. See Gist of my haml override method When I load my page in my Sinatra app the
bit of my layout.haml file just inserts the localised template name and not the results of the template. |
Aha I got it working. Of course I need to pass a the file contents of the template, not the name of the template :-) |
I'd go with: def localized_haml(template) |
Modify cookie[]= method to support additional options
Revert "Merge pull request sinatra#66 from kylewlacy/master" This reverts commit 1ad87b6, reversing changes made to 2141511.
Modify cookie[]= method to support additional options
Revert "Merge pull request sinatra#66 from kylewlacy/master" This reverts commit 1ad87b6, reversing changes made to 2141511.
I am using r18n in Sinatra
I'd like Sinatra's 'haml' method to automatically look for a template (say called hello.haml) first in views/{locale}/hello.haml and then if it can't fine one specific it will drop back to views/hello.haml
Is there are clean and simple way to do this?
The text was updated successfully, but these errors were encountered: