I need to call a method defined in a helper which uses content_for, I need to render some buttons& links at lots of views.
The question is, how can I benefit from the before_filter ? I know its not designed for helpers, so, what’s the proper way to do so ?
Currently, I am calling the helper method at most of views, which seems not practical.
If you’re calling a method in a bunch of views, you probably want to put it in the application layout (by default
app/views/layouts/application.html.erb)