Permalink
Browse files

brief refactor

  • Loading branch information...
1 parent 6e84b4a commit 3c82fb8d71975bd393dcc31ca9d4c50cc35dbb08 @SlexAxton SlexAxton committed Jan 28, 2013
Showing with 7 additions and 6 deletions.
  1. +7 −2 admin.rb
  2. +0 −4 config.ru
View
9 admin.rb
@@ -77,8 +77,9 @@ def ssl_enforce!
# Router
-get '/' do
- redirect '/admin/experiments'
+get '/assets/*' do
+ env['PATH_INFO'].sub!(%r{^/assets}, '')
+ Catapult.environment.call(env)
end
get '/admin/experiments' do
@@ -107,4 +108,8 @@ def ssl_enforce!
@variants = Abba::VariantPresentor::Group.new(@experiment, start_at: @start_at, end_at: @end_at)
erb :experiment
+end
+
+get '/' do
+ redirect '/admin/experiments'
end
View
4 config.ru
@@ -1,8 +1,4 @@
require './app'
require './admin'
-map '/assets' do
- run Catapult.environment
-end
-
run Sinatra::Application

0 comments on commit 3c82fb8

Please sign in to comment.