lib/wikimd/app.rb in wikimd-0.3.0 vs lib/wikimd/app.rb in wikimd-0.3.1

- old
+ new

@@ -79,16 +79,19 @@ end end # If no route matches, render the 404 page not_found do + @path = env['PATH_INFO'].sub(/^\//, '') slim :'404' end before do @flash = session[:flash] session[:flash] = nil end + + get('/') { redirect to('index.md') } post '/c/*' do |path| if (params[:compare] || []).length != 2 session[:flash] = { 'error' => 'Must select exactly 2 revisions!'