Render to string 渲染到字符串轨道3.1

Render to string 渲染到字符串轨道3.1,render-to-string,rails-3.1,Render To String,Rails 3.1,我试试这个: :content=>render_to_string(:template=>“#{path[:controller]}/#{path[:action]}.html.haml”) 在我的json中,但我使用kaminari对页面进行分页,并收到以下错误: ActionView::Template::Error(缺少带有{:handlers=>[:erb,:builder,:coffee,:haml],:formats=>[:json],:locale=>[:en,:en]}的部分ka

我试试这个:

:content=>render_to_string(:template=>“#{path[:controller]}/#{path[:action]}.html.haml”)

在我的json中,但我使用kaminari对页面进行分页,并收到以下错误:

ActionView::Template::Error(缺少带有{:handlers=>[:erb,:builder,:coffee,:haml],:formats=>[:json],:locale=>[:en,:en]}的部分kaminari/paginator

有人知道我是怎么解决这个问题的吗