Use login_path instead of explicit controller and actions

This makes future refactoring easier.
This commit is contained in:
Andy Allan 2021-03-10 14:14:36 +00:00
parent 2233edbcfa
commit 38ad8fbc36
13 changed files with 56 additions and 56 deletions

View file

@ -64,7 +64,7 @@
<% unless current_user %>
<div class="notice">
<%= link_to(t(".join_discussion"), :controller => "users", :action => "login", :referer => request.fullpath) %>
<%= link_to(t(".join_discussion"), login_path(:referer => request.fullpath)) %>
</div>
<% end %>

View file

@ -29,7 +29,7 @@
<% end %>
<% end %>
<% else %>
<h3 id="newcomment"><%= t(".login_to_leave_a_comment_html", :login_link => link_to(t(".login"), :controller => "users", :action => "login", :referer => request.fullpath)) %></h3>
<h3 id="newcomment"><%= t(".login_to_leave_a_comment_html", :login_link => link_to(t(".login"), login_path(:referer => request.fullpath))) %></h3>
<% end %>
</div>