Rails/Sinatra 中的 iphone 重定向
我正在开发一个 rails + sinatra 移动应用程序,我想在其中重定向到我的服务器上的特定位置(页面)。我在 .rb 文件中调用特定的 sinatra 函数(在控制器中,位于 {app_root}/lib/ 文件夹中),该函数在执行某些功能后呈现特定视图。
这工作正常,但当我想从控制器重定向其他网站(例如 www.google.com
)时,它会给出错误:加载页面错误
。
我正在使用 重定向“http://www.google.com”
I am working on a rails + sinatra mobile application in which I want to redirect to a specific location(page) on my server. I call a particular sinatra function (in controller which is in {app_root}/lib/ folder) in .rb file, which after performing some functionality render a specific view.
This works fine but when I want to redirect some other site like www.google.com
from the controller, it gives me Error: Loading Page error
.
I am usingredirect "http://www.google.com"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用的是 Rails,则要使用的命令是
http://api.rubyonrails。 org/classes/ActionController/Base.html
If you are using rails, the command you want to use is
http://api.rubyonrails.org/classes/ActionController/Base.html