-1
我有兩個控制器:的link_to不起作用RubyOnRails
MainController with pages: index.html.erb
LoginController with pages: login.html.erb, signup.html.erb, pasfor.html.erb
這是我的路線
https://gyazo.com/4acf99c74bbb7999d580e32fd1496386
我創建
<%= link_to '<li id="login-button"><i class="fa fa-plus"> Create event</i></li>'.html_safe, login_login_path %>
這從index.html的重定向。 erb to login.html.erb
I想要在login.html.erb中設置一個重定向到signup.html.erb的按鈕。所以我做了同樣的事情。按鈕在那裏,但當我點擊沒有發生。
<%= link_to '<button type="submit" class="btn btn-default">Register</button>'.html_safe, login_signup_path %>
這是一些金色的指教,謝謝! –