从“单元格”调用时,gmaps4rails 中缺少部分内容;渲染器
我正在使用 gem gmaps4rails 和 gem cells 两者本身都可以出色地工作。但是,我已经使用 haml 创建了一个单元格
= gmaps(@options)
,并且收到错误:
Missing partial /gmaps4rails/gmaps4rails with
{:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :coffee, :haml]}.
Searched in: * "/Users/bradphelan/workspace/openkitchen/app/cells"
有问题的代码是
----------------------
Google-Maps-for-Rails-75fc25d55f79/lib/gmaps4rails/helper/gmaps4rails_helper.rb
----------------------
15 def gmaps(options, enable_css = true, enable_js = true )
16 render :partial => 'gmaps4rails/gmaps4rails', :locals => { :options => options.with_indifferent_access, :enable_css => enable_css, :enable_js => enable_js }
17 end
渲染部分的位置。这应该有效。部分就在那里,当我从普通的 Rails 视图模板调用 gmaps 时,它就可以工作。不知何故,cells 弄乱了部分搜索路径和/或gmaps 未正确调用部分。不确定问题出在哪里。
I'm using gem gmaps4rails and gem cells both of which by themselves work brilliantly. However I've created a cell with haml
= gmaps(@options)
and I get the error
Missing partial /gmaps4rails/gmaps4rails with
{:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :coffee, :haml]}.
Searched in: * "/Users/bradphelan/workspace/openkitchen/app/cells"
the offending code is
----------------------
Google-Maps-for-Rails-75fc25d55f79/lib/gmaps4rails/helper/gmaps4rails_helper.rb
----------------------
15 def gmaps(options, enable_css = true, enable_js = true )
16 render :partial => 'gmaps4rails/gmaps4rails', :locals => { :options => options.with_indifferent_access, :enable_css => enable_css, :enable_js => enable_js }
17 end
where the partial is rendered. This should work. The partial is there and it works when I call gmaps from a normal rails view template. Somehow cells is messing the partial search path and/or gmaps is not calling the partial correctly. Not sure where the problem is.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
阅读您的问题,我意识到问题出在
gmaps4rails
方面。我刚刚在 github 上推送了修复程序,您可以尝试一下吗?
Reading your question, I realize the problem is on
gmaps4rails
side.I've just pushed a fix on github, could you try it please?