1
0
Fork 0
mirror of https://github.com/endofunky/sidetiq.git synced 2022-11-09 13:53:30 -05:00

Don't override #find_template to play nice with other web extensions.

This commit is contained in:
Tobias Svensson 2013-02-04 13:47:29 +00:00
parent 7f685969cb
commit e5fb3c73c5

View file

@ -2,20 +2,14 @@ require 'sidekiq/web'
module Sidetiq
module Web
def self.registered(app)
app.helpers do
def find_template(view, *args, &block)
path = File.expand_path(File.join('..', 'views'), __FILE__)
super(path, *args, &block)
super
end
end
VIEWS = File.expand_path('views', File.dirname(__FILE__))
def self.registered(app)
app.get "/sidetiq" do
clock = Sidetiq::Clock.instance
@schedules = clock.schedules
@time = clock.gettime
slim :sidetiq
slim File.read(File.join(VIEWS, 'sidetiq.slim'))
end
app.get "/sidetiq/:name" do
@ -30,7 +24,7 @@ module Sidetiq
worker.name == name
end.flatten
slim :sidetiq_details
slim File.read(File.join(VIEWS, 'sidetiq_details.slim'))
end
end
end