在哪里为rails`link_to'配置默认协议?
rails link_to
生成了http://
prfeix的链接。但是网站是https
。
因此,不得像这样使用表格。实际上,它不适用于大多数浏览器。
该问题出现在spree
shop中。 spree
的内部模板生成错误的URL。因此,修改spree
内部模板将协议添加到每个link_to
不是解决方案。
在哪里为Rails配置默认协议link_to
?
Rails link_to
generates a link with http://
prfeix. But site is https
.
So forms must not be used like so. And actually it is not working for most browsers.
The problem appears in spree
shop. Internal templates of spree
generates wrong urls. So modify spree
internal templates to add protocol to each link_to
is not a solution.
Where default protocol is configured for rails link_to
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要传递
:stolopt => URL创建中的“ HTTPS”
。You need to pass
:protocol => 'https'
inside the url creation.