From fcf27cdea5c786c63548ff1ca7effc0406ddad94 Mon Sep 17 00:00:00 2001 From: Mehmet Aydogdu <140202062@kocaeli.edu.tr> Date: Mon, 30 Mar 2020 04:34:26 +0300 Subject: [PATCH] DOC: An easier mounting method with devise (#112) --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 2e445824..0816faf0 100644 --- a/README.md +++ b/README.md @@ -100,6 +100,16 @@ The reason this doesn't happen in rails apps is because ActiveSupport has a monk end ``` +### Mount using devise (method 2) +Change :admin_user symbol with your devise user, example :user. +In -> lambda block change admin? method with your authorization method +Or simply define a admin? method in you user model. +``` + authenticate :admin_user, ->(u) { u.admin? } do + mount Logster::Web, at: "/logs" + end +``` + Out of the box, logster will use the default redis connection, to customise, in `config/application.rb` ```