diff --git a/lib/dashing.rb b/lib/dashing.rb index 7d066cca..a66114cd 100644 --- a/lib/dashing.rb +++ b/lib/dashing.rb @@ -49,7 +49,8 @@ def protected! get '/:dashboard' do protected! - erb params[:dashboard].to_sym + engine = Dir.glob("#{settings.views}/#{params[:dashboard]}.*").first.split('.').last + send engine.to_sym, params[:dashboard].to_sym end get '/views/:widget?.html' do