-
Notifications
You must be signed in to change notification settings - Fork 12
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
helper functions in haml #10
Comments
ok, the solution above wasn't quite enough for my needs. i've implemented something a bit more interesting in: http://github.com/danieldkim/picard/commit/5cba5a48c308b07e786093c09d6fe25df7812034 this makes the request scope available to the mixin functions through |
you can ignore the previous comment as that commit was just a more convoluted way of providing what the previous commit already did. argh, it's way past my bedtime ... |
Thanks for your contributions Daniel. I still haven't had a chance to look into this yet, I'll try and take a gander this weekend. |
np, dante. happy to contribute. this little change allows me to do something like this in my configuration:
and then use that is_blank() function in my haml code. btw, there's a few other things that i've built on top of picard in my own project that may or may not make sense to pull into picard in some form (although the more of this stuff that picard takes on the less "micro" it becomes):
|
Today's release of several commits (soon to be 0.2 release) Resolves this issue. Merging custom objects with the view scope is now supported by calling helpers(). |
thanks, the helpers functionality works nicely. i also like the improved exception handling, toned-down logging, template caching (though there is an issue with that that i'll log shortly), and less-verbose haml syntax -- overall, a great release! |
need a mechanism to make helper functions accessible from haml code.
i've committed a simple solution in my fork:
http://github.com/danieldkim/picard/commit/95ebf42150a7fc78de2e73157f47bcf53821af6a
please merge if it looks reasonable.
The text was updated successfully, but these errors were encountered: