Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/67.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails Rails渲染格式haml_Ruby On Rails_Ruby_Haml - Fatal编程技术网

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