Skip to content

Instantly share code, notes, and snippets.

@dongyuwei
Created August 24, 2017 07:53
Show Gist options
  • Select an option

  • Save dongyuwei/db1c6e4bbeab4b5ea45ccb0272da14f9 to your computer and use it in GitHub Desktop.

Select an option

Save dongyuwei/db1c6e4bbeab4b5ea45ccb0272da14f9 to your computer and use it in GitHub Desktop.
admin_constraint = lambda do |request|
request.env['warden'].authenticate? and not request.env['warden'].user.nil?
end
constraints admin_constraint do
mount Logster::Web, at: "/logs"
end
@dongyuwei

dongyuwei commented Aug 24, 2017

Copy link
Copy Markdown
Author

mount logster in routes.rb

logster

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment