scope of markers variable for google maps (gmaps4rails gem)
问题 I'm trying to understand javascript, and the way variables are passed around, but I'm not doing too well. I'm trying to refresh a google map's markers with ajax, but nothing is happening. I submit a form, which sends some variables to the controller. Some stuff is processed, and it responds with .js to... find.js.erb $('#collapseTwo ul').html("<%= j render partial: 'events/sidebar', collection: @events %>"); alert(<%= raw @hash.to_json %>); clearMarkers(); markers = handler.addMarkers(<%= raw