From 1315cac7c303429bdfc56ef061d98b158bf67b4d Mon Sep 17 00:00:00 2001 From: Jeremy Attali Date: Sat, 25 Jan 2014 23:57:37 +0100 Subject: add error string when widget not rendered This prevents the cryptic ruby raw string being printed if no rendering template were found. Closes: #307 --- lib/dashing/app.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/dashing') diff --git a/lib/dashing/app.rb b/lib/dashing/app.rb index 033849c..933ef5b 100644 --- a/lib/dashing/app.rb +++ b/lib/dashing/app.rb @@ -117,6 +117,7 @@ get '/views/:widget?.html' do file = File.join(settings.root, "widgets", params[:widget], "#{params[:widget]}.#{suffix}") return engines.first.new(file).render if File.exist? file end + "Drats! Unable to find a widget file named: #{params[:widget]} to render." end def send_event(id, body, target=nil) -- cgit v1.2.3