Skip to content

Commit

Permalink
Address deprecation warning regarding public_folder for Sinatra 1.3+
Browse files Browse the repository at this point in the history
  • Loading branch information
rossta committed Jul 26, 2012
1 parent a0a1c44 commit c2072f7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/rollout_ui/server.rb
Expand Up @@ -13,9 +13,14 @@ class Server < Sinatra::Base
dir = File.dirname(File.expand_path(__FILE__))

set :views, "#{dir}/server/views"
set :public, "#{dir}/server/public"
set :static, true

if respond_to? :public_folder
set :public_folder, "#{dir}/server/public"
else
set :public, "#{dir}/server/public"
end

helpers do
include Rack::Utils
alias_method :h, :escape_html
Expand Down

0 comments on commit c2072f7

Please sign in to comment.