简体   繁体   中英

Where do I find the url that the built in rails server provides to store data?

I want to use the $.ajax() call and I'm not sure where to point the url:

I use the embedly API to change a link to an embedded video, thumbnail, and title. The link is located in two partials. One of the partials is rendered by the show view, and the other is rendered in the index view. The views are in the videos directly of views . I want to POST the data that is generated dynamically from this link to the server. What url should I be pointing to?

What type of resource are you trying to save? Without knowing more details it is hard to say. But, you have to setup the correct routes, controller, and models to handle your ajax requests.

Read some of the rails guides, specifically the Getting Started guide to get going.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM