Skip to content

Commit

Permalink
integrate @knu's suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
cantino committed Aug 16, 2015
1 parent ce84f15 commit 8713dce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/controllers/agents_controller.rb
Expand Up @@ -239,6 +239,8 @@ def redirect_back(message, options = {})
when "show"
if @agent && !@agent.destroyed?
path = agent_path(@agent)
else
path = agents_path
end
when /\A#{Regexp::escape scenarios_path}\/\d+\z/, agents_path
path = ret
Expand All @@ -247,7 +249,7 @@ def redirect_back(message, options = {})
if path
redirect_to path, notice: message
else
redirect_to agents_path, notice: message
super agents_path, notice: message
end
end

Expand Down

0 comments on commit 8713dce

Please sign in to comment.