2

I have to logout a user(admin_user) if the user(admin_user) is not using the application for 15 minutes. How it can be done? I have tried installing activeadmin in my vendor and overriding it(putting devise.rb inside initializers folder inside vendor and write set timeout it did not work), but I don't know how that works. Please help me. I cannot write it in devise.rb as it is done via normal login(user).

Also I have one more query, how the main navigation bar can be changed in activeadmin? I need two menu one in main navigation bar and according sub navigation. Is this achievable through activeadmin?

1
  • You should ask two questions for two questions you have) May 28, 2014 at 13:58

2 Answers 2

4

Jut use config.timeout_in = 15.minutes in your devise.rb initializer. Active admin has nothing to do with that.

1
  • Hello roman, thanks for your answer. I am using two user session for the application say user model for normal login and admin_user for admin login. what happens in that case? May 28, 2014 at 14:02
0

I don't know whether this is the correct way of getting layouts, but I found the solution creating my_navigation resource in active admin.

class MyNavigation < ActiveAdmin::Component
  def build(namespace, menu)
    if current_admin_user
    render :partial => "/layouts/admin_header"
            else
            render :partial => "/layouts/company_admin_header"
            end
        end

end

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.