Skip to content

Instantly share code, notes, and snippets.

@orbanbotond
Created June 3, 2013 08:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save orbanbotond/5696887 to your computer and use it in GitHub Desktop.
Save orbanbotond/5696887 to your computer and use it in GitHub Desktop.
authentication constrained routes
constraint = lambda { |request| request.env["warden"].authenticate? and request.env['warden'].user.admin? }
constraints constraint do
mount Sidekiq::Web, :at => '/admin/sidekiq'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment