Ruby on rails Rails渲染格式haml
我有两个文件Ruby on rails Rails渲染格式haml,ruby-on-rails,ruby,haml,Ruby On Rails,Ruby,Haml,我有两个文件 /show.html /show.html.haml 当我试图渲染haml文件时,它不起作用 render :show, :formats => [:html] #works render :show, :formats => [:haml] #doesn't work, Missing template error haml不是格式,而是处理程序,格式仍然是html 执行此操作:render:show,格式:[:html],处理程序:[:haml]将show.ht
/show.html
/show.html.haml
当我试图渲染haml文件时,它不起作用
render :show, :formats => [:html] #works
render :show, :formats => [:haml] #doesn't work, Missing template error
haml
不是格式,而是处理程序,格式仍然是html
执行此操作:
render:show,格式:[:html],处理程序:[:haml]
将show.html.haml
重命名为show.haml