Fixed that destroying a user from the edit page returns a 404 response (#11691).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10240 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-08-26 10:50:59 +00:00
parent ebc979e9b1
commit c68ee7f545
3 changed files with 9 additions and 2 deletions
+1 -1
View File
@@ -174,7 +174,7 @@ class UsersController < ApplicationController
def destroy
@user.destroy
respond_to do |format|
format.html { redirect_to_referer_or(users_url) }
format.html { redirect_back_or_default(users_url) }
format.api { render_api_ok }
end
end
+1 -1
View File
@@ -46,7 +46,7 @@
<td class="last_login_on" align="center"><%= format_time(user.last_login_on) unless user.last_login_on.nil? %></td>
<td class="buttons">
<%= change_status_link(user) %>
<%= delete_link user_path(user) unless User.current == user %>
<%= delete_link user_path(user, :back_url => users_path(params)) unless User.current == user %>
</td>
</tr>
<% end -%>