Hello,
I followed guide and everything works except parsing json.
When I replaced static marker with this
(<%=raw @hash.to_json %>)
I'm getting this error in console:
SyntaxError: Unexpected token '<'
Due to this error I can't even see map itself
Here is show.html.slim
def show
@places = Places.find(params[:id])
@hash = Gmaps4rails.build_markers(@places) do |places, marker|
marker.lat places.latitude
marker.lng places.longitude
end
end
Hello, I followed guide and everything works except parsing json. When I replaced static marker with this
(<%=raw @hash.to_json %>)
I'm getting this error in console:SyntaxError: Unexpected token '<'
Due to this error I can't even see map itself Here is show.html.slimAnd here is places_controller.rb/show action
Where's the problem?