Remove unnecessary controller references from the redirect hashes.

Rails redirect_to uses the current controller by default, so there
is no need to re-iterate this in the code when the redirect targets
the current controller.

The short-form is already used elsewhere, this just tidies up those
which were still using the long-form.
This commit is contained in:
Andy Allan 2016-10-12 14:32:49 +01:00
parent c2e12ed77d
commit 41e05f0929
4 changed files with 22 additions and 22 deletions

View file

@ -95,11 +95,11 @@ class TraceController < ApplicationController
@title = t "trace.view.title", :name => @trace.name
else
flash[:error] = t "trace.view.trace_not_found"
redirect_to :controller => "trace", :action => "list"
redirect_to :action => "list"
end
rescue ActiveRecord::RecordNotFound
flash[:error] = t "trace.view.trace_not_found"
redirect_to :controller => "trace", :action => "list"
redirect_to :action => "list"
end
def create