4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'app/helpers/c80_map/application_helper.rb', line 4
def render_map(page_tag)
if page_tag == 'index'
p = Rails.root.join("public", "locations.json")
locs = File.read(p)
locs_hash = JSON.parse(locs)
locs_hash["img"] = image_path(locs_hash["img"])
render :partial => 'c80_map/map_row_index',
:locals => {
locs_hash: locs_hash,
mapwidth:locs_hash["mapwidth"],
mapheight:locs_hash["mapheight"]
}
else
render :partial => 'c80_map/map_row'
end
end
|