javascript - Gmap4rails: infowindow render action from different controller -



javascript - Gmap4rails: infowindow render action from different controller -

i have home.html.erb file displaying markers. markers correspond new sport created user. when marker clicked want display sport info (along other values). in main controller have associated show partial markers , pass required locales.

@hash = gmaps4rails.build_markers(@game) |game, marker| marker.lat game.latitude marker.lng game.longitude marker.infowindow render_to_string(:partial => 'games/show', :layout => false, :locals => { :@game => @game }) end end

in _show.html.erb file, trying display sport, associated game.

<div class="row"> <aside class="span4"> <section> <p> <strong>sport:</strong> <%= @game.sport %> </p> </section> </aside> </div>

i getting next error. undefined method `sport' #.

how can display parameters in @game in infowindow.

regards hari

javascript ruby-on-rails google-maps

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -