app/helpers/resque_web/application_helper.rb in resque-web-0.0.4 vs app/helpers/resque_web/application_helper.rb in resque-web-0.0.5
- old
+ new
@@ -2,16 +2,20 @@
module ApplicationHelper
PER_PAGE = 20
def tabs
- {'overview' => overview_path,
- 'working' => working_index_path,
- 'failures' => failures_path,
- 'queues' => queues_path,
- 'workers' => workers_path,
- 'stats' => stats_path
+ t = {'overview' => ResqueWeb::Engine.app.url_helpers.overview_path,
+ 'working' => ResqueWeb::Engine.app.url_helpers.working_index_path,
+ 'failures' => ResqueWeb::Engine.app.url_helpers.failures_path,
+ 'queues' => ResqueWeb::Engine.app.url_helpers.queues_path,
+ 'workers' => ResqueWeb::Engine.app.url_helpers.workers_path,
+ 'stats' => ResqueWeb::Engine.app.url_helpers.stats_path
}
+ ResqueWeb::Plugins.plugins.each do |p|
+ p.tabs.each { |tab| t.merge!(tab) }
+ end
+ t
end
def tab(name,path)
content_tag :li, link_to(name.capitalize, path), :class => current_tab?(name) ? "active" : nil
end