简体   繁体   English

我在哪里可以找到内置Rails服务器提供的用于存储数据的URL?

[英]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: 我想使用$.ajax()调用,但是我不确定在哪里指向该url:

I use the embedly API to change a link to an embedded video, thumbnail, and title. 我使用嵌入式API来更改指向嵌入式视频,缩略图和标题的链接。 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. 部分视图由show视图呈现,而另一个视图则在index视图中呈现。 The views are in the videos directly of views . 观看videos直接出现在viewsvideos中。 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. 但是,您必须设置正确的路由,控制器和模型来处理您的ajax请求。

Read some of the rails guides, specifically the Getting Started guide to get going. 阅读一些rails指南,特别是Getting Started指南。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我在哪里将我的Rails URL插入JQuery Autocomplete中以引用我想要的数据集? - Where do I insert my Rails URL in the JQuery Autocomplete to reference the data set I want? 如何在Rails模型中存储传递给宏方法的值? - Where do I store the values passed to a macro method in a Rails model? 我在Rails应用程序中的哪里存储静态信息? - where do I store static information in rails application? 在rails中存储临时数据的位置 - Where to store temporary data in rails 我应该在哪里存储常量数据,然后如何在Rails中引用它? - Where should I store constant data and then how to reference it in Rails? Ruby on Rails:如何找出调用方法的位置? - Ruby on Rails: how do I find out where a method is called? 如何在Rails中为精炼厂的内置用户找到模型 - How do I find a model for Refinery's built-in users in Rails 在Apache服务器上的哪里存储Rails站点? - Where to store Rails sites on an Apache server? 如何在Rails中存储模型数据的版本? - How do I store versions of model data in rails? Rails-我的Rails项目中必须在其中存储数据文件(.dat)的位置-GeoIp City数据库 - Rails - Where I have to store data file (.dat) in my rails project - GeoIp City database
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM