Search code examples
ruby-on-railsruby-on-rails-3partial-viewsgmaps4railsrails-cells

Missing partial in gmaps4rails when called from a 'cell' renderer


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.


Solution

  • Reading your question, I realize the problem is on gmaps4rails side.

    I've just pushed a fix on github, could you try it please?