Я использую следующую строку в одном из моих файлов erb:
<%=@map.div(:width => 800, :height => 500)%>
выводит следующий HTML:
<div id="map" style="width:800px;height:500px" ></div>
Отображается как: <div id="map" style="width:800px;height:500px" ></div>
в браузере.
РЕДАКТИРОВАТЬ: мой единственный другой код:
require 'rubygems'
include GeoKit::Geocoders
class HomeController < ApplicationController
def index
coordinates =[13.0343841, 80.2502535] #you can get the coordinates for the location you want from http://stevemorse.org/jcal/latlon.php
@map = GMap.new('map')
@map.control_init(:large_map => true, :map_type => true)
@map.center_zoom_init(coordinates,10) # here 10 referes to the zoom level for a map
@map.overlay_init(GMarker.new(coordinates,:title => 'Chennai', :info_window => 'Chennai'))
end
end
Почему он это делает? Как я могу запретить rails 3 переводить мой код в специальный символ?