Skip to content

Commit

Permalink
⚗️ Attemps to use Sinatra Reloader
Browse files Browse the repository at this point in the history
  • Loading branch information
jsiny committed Dec 15, 2019
1 parent 80dcc4f commit b30008b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion deep_sea.rb
@@ -1,5 +1,4 @@
require 'sinatra'
require 'sinatra/reloader' if development?
require 'sinatra/content_for'
require 'tilt/erubis'
require 'securerandom'
Expand All @@ -13,6 +12,13 @@
set :erb, escape_html: true
end

configure(:development) do
require 'sinatra/reloader'
also_reload 'lib/game.rb'
also_reload 'lib/round.rb'
# Dir[File.join(__dir__, 'lib', '*.rb')].each { |file| also_reload file }
end

before '/round/:round_id/*' do
@round_id = params[:round_id].to_i
@round = session[:game].round
Expand Down

0 comments on commit b30008b

Please sign in to comment.