Using Rails helpers in Haml files in the asset pipeline? -


i'm trying use rails helper method render in order use haml templates use throughout web app. have templates in app/assets/javascripts/app/templates.

after searching end possible solution (adding in ruby initializer file):

rails.application.assets.context_class.class_eval   include actionview::helpers   include rails.application.routes.url_helpers   include hamlhelper end  tilt.register customhamlengine::hamltemplate, '.haml' 

now seems render method being used there's error:

undefined local variable or method `view_renderer' #<#<class:0x00000102baf740>:0x00000102c876e0> 

what i'm doing wrong?


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -