这是原始的Devise注销链接,它起作用:
link_to("Logout", destroy_user_session_path, :method => :delete)
因为和我不得不切换到这种链接。现在的问题是链接尝试找到用户sign_out
尝试:
<%= link_to (destroy_user_session_path, :method => :delete) do %>
<i class="icon-off"></i> Logout</span>
<% end %>
和
<%= link_to (destroy_user_session_path, method => :delete) do %>
<i class="icon-off"></i> Logout</span>
<% end %>
和
<%= link_to (destroy_user_session_path, :method = 'delete') do %>
<i class="icon-off"></i> Logout</span>
<% end %>
有任何想法或建议吗?
答案 0 :(得分:0)
我愿意,
<span>
<i class="icon-off">
</i>
<%= link_to("Logout",destroy_user_session_path, :method => :delete)%>
</span>