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 8127067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T07:23:23+00:00 2026-06-06T07:23:23+00:00

I would like to create a new controller that will allow the admin user

  • 0

I would like to create a new controller that will allow the admin user to edit models attached to users outside of rails admin. Here is a sample from my routes.rb:

devise_for :admins

mount RailsAdmin::Engine => '/admin', :as => 'rails_admin'

devise_for :dealers 
devise_for :users

get "..." => "..."
etc

What do I need to do in both my controller and in routes.rb to make this possible? I’m fairly new to Rails. Thanks! I have a limited amount of time so making a rails-admin plugin is not feasible.

  • 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-06T07:23:26+00:00Added an answer on June 6, 2026 at 7:23 am

    In your controller check if an admin is loged in using admin_signed_in?, and you can also access it by current_admin. So you just have to place conditions checking if it’s and admin to enable or not those functionalities.

    EDIT:

    You can have something like this in your before_filter

    before_filter :check_authentication
    
    private
    
    def check_authentication
      authenticate_user! unless admin_signed_in?
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to create a 'New Document' dialog similar to the Office 2007
I would like to create a new unix command to automatically list the contents
NSString *phoneNumber = @2310234432; I would like to create a new string out of
I would like to create a template for new stored procedures for our development
I'm still new to Javascript and would like to create a 'pages' feature for
I am fairly new to using SSRS and I would like to create a
I am new to this iPhone development.I would like to create a hybrid application
Iam quite new to functions in SQL and I would like to create a
In PHP, to create a new object you would do something like this, $dog
I am trying to create an action ( :my_action ) route that will allow

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.