渲染到字符串 Rails 3.1
我试试这个:
:内容=> render_to_string(:template => "#{path[:controller]}/#{path[:action]}.html.haml")
在我的 json 中,但我使用 kaminari 来分页并收到此错误:
ActionView::Template::Error(缺少部分 kaminari/paginator 和 {:handlers=>[:erb, :builder, :coffee, :haml], :formats=>[:json], :locale= >[:en, :en]}。
有人知道我如何解决这个问题吗?
I try this:
:content => render_to_string(:template => "#{path[:controller]}/#{path[:action]}.html.haml")
In my json, but I use kaminari to paginate pages and a receive this error:
ActionView::Template::Error (Missing partial kaminari/paginator with {:handlers=>[:erb, :builder, :coffee, :haml], :formats=>[:json], :locale=>[:en, :en]}.
Anyone know how I solution this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论