Skip to content

Commit

Permalink
feat: allow to customize path to job status metal
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhidkovDenis committed May 14, 2018
1 parent e5dfea7 commit cc0877a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
end
end

get '/_job_(/:id)',
get "#{Rails.application.config.resque_job_status.fetch(:route_path)}(/:id)",
to: 'resque/jobs#show',
as: 'job_status',
constraints: ::Rails.application.config.resque_job_status.fetch(:route_constraints)
Expand Down
2 changes: 1 addition & 1 deletion lib/resque/integration/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class Engine < Rails::Engine
end

initializer 'resque-integration.application', before: :load_config_initializers do |app|
app.config.resque_job_status = {route_constraints: {domain: :current}}
app.config.resque_job_status = {route_constraints: {domain: :current}, route_path: '/_job_'}
end
end # class Engine
end # module Resque::Integration

0 comments on commit cc0877a

Please sign in to comment.