mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Redirect to retries page when modifying retries
Instead of going to the front page it's better to redirect to the page where the button was actually pressed.
This commit is contained in:
parent
0addaba4a6
commit
d58cfe959a
2 changed files with 4 additions and 4 deletions
|
@ -192,7 +192,7 @@ module Sidekiq
|
|||
process_score('retry', s, :delete)
|
||||
end
|
||||
end
|
||||
redirect root_path
|
||||
redirect "#{root_path}retries"
|
||||
end
|
||||
|
||||
post "/retries/:score" do
|
||||
|
@ -203,7 +203,7 @@ module Sidekiq
|
|||
elsif params['delete']
|
||||
process_score('retry', score, :delete)
|
||||
end
|
||||
redirect root_path
|
||||
redirect "#{root_path}retries"
|
||||
end
|
||||
|
||||
def process_score(set, score, operation)
|
||||
|
|
|
@ -110,7 +110,7 @@ class TestWeb < MiniTest::Unit::TestCase
|
|||
|
||||
post "/retries/#{score}", 'delete' => 'Delete'
|
||||
assert_equal 302, last_response.status
|
||||
assert_equal 'http://example.org/', last_response.header['Location']
|
||||
assert_equal 'http://example.org/retries', last_response.header['Location']
|
||||
|
||||
get "/retries"
|
||||
assert_equal 200, last_response.status
|
||||
|
@ -122,7 +122,7 @@ class TestWeb < MiniTest::Unit::TestCase
|
|||
|
||||
post "/retries/#{score}", 'retry' => 'Retry'
|
||||
assert_equal 302, last_response.status
|
||||
assert_equal 'http://example.org/', last_response.header['Location']
|
||||
assert_equal 'http://example.org/retries', last_response.header['Location']
|
||||
|
||||
get '/queues/default'
|
||||
assert_equal 200, last_response.status
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue