How to use jquery load to open rails restful routes in a div
If I'm abusing terminology, please excuse it.
So I'm using the google maps api, and jQuery, in a rails app. When a marker is clicked, I want content to load in a div. I can do this now. But I can't figure out how to load a restful route, like '/places/1/stories/3'.
this is what I have inside the function that listens for a user to click a map marker: ("story_view" is the div id where content is loaded)
$("#story_view").load('/places')
return false;
This works perfectl开发者_如何学Goy, if all I wanted to do was load the places_path, but I need to be able to load content into the div based on parameters, like :id => @place.to_param, make sense?
How do I achieve this?
精彩评论