我想要一个链接使用SSL.我正在使用此代码:
<%= link_to "Buy now!", line_items_path(:thing_id => @thing), :method => :post, :protocol => "https", :only_path => false %>
Run Code Online (Sandbox Code Playgroud)
出于某种原因,正在生成链接http://而不是https://.
我正在使用Rails 3.0.3.
Rya*_*igg 24
您必须将:protocol选项放在路径助手中:
<%= link_to "Buy now!", line_items_url(:thing_id => @thing, :protocol => "https"), :method => :post %>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6534 次 |
| 最近记录: |