Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9093865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T23:12:44+00:00 2026-06-16T23:12:44+00:00

I have installed the Activ Admin gem but not sure it will be of

  • 0

I have installed the Activ Admin gem but not sure it will be of any help. I have some pages which I want to hide from being seen by anonymous and some from logged in users too. How can I do it ?

I am sure there must be ACL gems in RoR but I am not sure which is the standard and preferred way to do it ? any help ? Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T23:12:45+00:00Added an answer on June 16, 2026 at 11:12 pm

    I’m not familiar with Active Admin but,
    assuming you already have a way of determining if a user is logged in (and you have a way to address the current_user), you could simply do the following:

    in your controller (or in your sessionshelper for example)

    def admin_users_only
      unless current_user.admin? redirect_to "wherever you want to redirect to"
    end
    

    in the same controller

    before_filter :admin_users_only, only: [:index, :or, :any, :other]
    

    (of course your user model needs an admin attribute)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have installed rails 3.0.3 but I can not find where the source code
I have installed Active_Admin gem in my app but I have a filter on
I have installed active admin on my development machine and it works fine. But
I have installed Xampp for ubuntu. It is located in /opt/lampp. I want to
I have installed xampp on Windows7(64bit).I want to work with PHP, Apache and MySql.
I have searched around, but I have not been able to find a answer
I have installed the flexslider plugin, click here which is working fine, However there's
I have install refinery with devise gem, which workds good, when i install refinery
I have friendly_id and ActiveScaffold installed for my Rails application. Because not all of
I have installed the sweet Google-Maps-for-Rails plugin, which seems to be under active development.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.