Permalink
Browse files

added note about rails 3 mount

  • Loading branch information...
1 parent e847ad2 commit 57ae8dfbc475e763a1b5854037564c95851b2059 @maletor committed Sep 15, 2011
Showing with 9 additions and 1 deletion.
  1. +9 −1 README.mdown
View
@@ -112,14 +112,22 @@ will always have red buttons. This won't be stored in your session or count towa
Split comes with a Sinatra-based front end to get an overview of how your experiments are doing.
-You can mount this inside your app using Rack::URLMap in your `config.ru`
+If you are running Rails 2: You can mount this inside your app using Rack::URLMap in your `config.ru`
require 'split/dashboard'
run Rack::URLMap.new \
"/" => Your::App.new,
"/split" => Split::Dashboard.new
+However, if you are using Rails 3: You can mount this inside your app routes by first adding this to the Gemfile:
+
+ gem 'split', :require => 'split/dashboard'
+
+Then adding this to config/routes.rb
+
+ mount Split::Dashboard, :at => 'split'
+
You may want to password protect that page, you can do so with `Rack::Auth::Basic`
Split::Dashboard.use Rack::Auth::Basic do |username, password|

0 comments on commit 57ae8df

Please sign in to comment.