对于我的网络应用程序,我正在使用设计进行用户身份验证。唉,当我单击链接时,应用程序不会返回登录(或注册)页面,而是返回根页面。也许有人可以帮忙?谢谢!
路线.rb:
root to: 'static#home'
devise_for :users
devise_for :user, :path => '', :path_names => { :sign_in => "login", :sign_out => "logout", :sign_up => "register" }
_header.html.erb:
<header class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<%= link_to "Kung Pao", '#', id: "logo" %>
<nav>
<ul class="nav pull-right">
<li><%= link_to "Start", root_path %></li>
<li><%= link_to "Login", new_user_session_path %></li>
<li><%= link_to "Registrierung", new_user_registration_path %></li>
</ul>
</nav>
</div>
</div>
</header>
耙路线:
root / static#home
new_user_session GET /login(.:format) devise/sessions#new
user_session POST /login(.:format) devise/sessions#create
destroy_user_session DELETE /logout(.:format) devise/sessions#destroy
user_password POST /password(.:format) devise/passwords#create
new_user_password GET /password/new(.:format) devise/passwords#new
edit_user_password GET /password/edit(.:format) devise/passwords#edit
PUT /password(.:format) devise/passwords#update
cancel_user_registration GET /cancel(.:format) devise/registrations#cancel
user_registration POST / devise/registrations#create
`enter code here` new_user_registration GET /register(.:format) devise/registrations#new
edit_user_registration GET /edit(.:format) devise/registrations#edit
PUT / devise/registrations#update
DELETE / devise/registrations#destroy