Closed peregrinator closed 11 years ago
Hi @peregrinator,
You should do so in a .js
(or .coffee
) file. For example, in Rails, you might just add the registration of helpers directly to application.js
or one of the files it pulls in.
The flow of JS should be something like this:
After registration, the helper is available to all your templates.
Does that help?
Apparently I need to go to bed. That works great for me now, sorry for the trouble - I was sure there was something I was missing!
I'm sure this is something simple but I haven't been able to figure this out quickly so it might be worth a mention in the README or docs somewhere.
How does one register a helper to be used with templates?
Thanks!