ryangomba/oregontrail — pull request #17 by ryangomba (2011-10-31 18:01:23+00:00)
Title: M8 Map View

Guys - I figured out the map view. As far as I can tell, you CAN use .js.erb but ONLY in the view (not within the assets folder). So what I ended up doing is this:

respond_to do |format|
format.html
format.js
end

That means we can render "/map.js" and pass in all our variables to the map.js.erb view. Then, "/map" can just call in its view.

Take a look.