Skip to content

Instantly share code, notes, and snippets.

@resistorsoftware
Created April 12, 2011 12:38
Show Gist options
  • Select an option

  • Save resistorsoftware/915428 to your computer and use it in GitHub Desktop.

Select an option

Save resistorsoftware/915428 to your computer and use it in GitHub Desktop.
My initial Rackup file
use Rack::Session::Cookie, :secret => 'whatever'
use Rack::Flash
use Rack::MethodOverride
use Warden::Manager do |manager|
manager.default_scope = :user
manager.scope_defaults :user, :strategies => [:password]
manager.scope_defaults :admin, :store => true, :strategies => [:admin]
manager.failure_app = Main::App
end
# handle Vendors (aka the Public)
map "/" do
run Main::App
end
# handle Admins
map "/admin" do
run Admin::App
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment