Friday, July 2, 2010

[Rails] Outputting a rails url to javascript

Hi,

I'm working on a rails/google maps app, where makers on the map show
'places'. I would like to be able to put a link into each marker's
infowindow that will take the user to the 'show' action for that place
(ie. /places/[place_id]), and am looking for ways to output the
appropriate url so it can be incorporated into my /public/javascripts/
map.js file. I'm using json to output the latititude, longitude, name
etc of each place to the map...is there a way to extend this to urls?

Any help would be much appreciated, thanks in advance!

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate