Simplify redirect.
This commit is contained in:
parent
674589ce2c
commit
b2ff9f3aad
1 changed files with 1 additions and 5 deletions
|
@ -192,11 +192,7 @@ class TraceController < ApplicationController
|
||||||
trace.visible = false
|
trace.visible = false
|
||||||
trace.save
|
trace.save
|
||||||
flash[:notice] = t "trace.delete.scheduled_for_deletion"
|
flash[:notice] = t "trace.delete.scheduled_for_deletion"
|
||||||
if current_user.administrator? || current_user.moderator?
|
redirect_to :action => :list, :display_name => trace.user.display_name
|
||||||
redirect_to :action => :list, :display_name => trace.user.display_name
|
|
||||||
else
|
|
||||||
redirect_to :action => :list, :display_name => current_user.display_name
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
rescue ActiveRecord::RecordNotFound
|
rescue ActiveRecord::RecordNotFound
|
||||||
head :not_found
|
head :not_found
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue