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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:11:33+00:00 2026-06-03T07:11:33+00:00

Im using rails 3.2 and am having trouble using pre-created devise alongside active admin

  • 0

Im using rails 3.2 and am having trouble using pre-created devise alongside active admin using a single model and an HABTM relation to a Role model.

I’ve followed this tutorial http://jaysonlane.net/2012/04/rails-devise-and-active-admin-single-user-model

And have altered a few things such as

unless current_user.admin?

for

unless current_user.roles.first.id==1 #checks if its an admin or not

If I log in with a regular user and try to access admin page through :300/admin I get a “Permission denied”, which is a good thing.

However, if I log with an admin account(it sucessfully logs as an admin), and go to :3000/admin, it displays and error:

NoMethodError in Admin/dashboard#index
undefined method for 'destroy_admin_user_session_path'

changing it to:

config.logout_link_path = :destroy_current_admin_user_session_path
or
config.logout_link_path = :destroy_current_user_session_path

won’t help either.

Thanks you in advance for your help

FIXED:

Had to run rake routes and alter the defaut active_admin initializer path and methods to my routes.

As for the error in logging out, apparently the default method for signing out with Active admin is :get.
Therefore, an error occurs when clicking “Logout” in active admin.
To fix this, go to config->initializers->active_admin.rb and add

config.logout_link_method= :delete

Hope this helps someone.

Thank you again @pjammer and @iain for your help in poiting me in the right direction.
Regards

  • 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-03T07:11:34+00:00Added an answer on June 3, 2026 at 7:11 am

    Had to run rake routes and alter the defaut active_admin initializer path and methods to my routes.

    As for the error in logging out, apparently the default method for signing out with Active admin is :get. Therefore, an error occurs when clicking “Logout” in active admin. To fix this, go to config->initializers->active_admin.rb and add

    config.logout_link_method= :delete
    Hope this helps someone.

    Thank you again @pjammer and @iain for your help in poiting me in the right direction. Regards

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

Sidebar

Related Questions

I'm using rails 3.1 with Devise for user authentication... I'm having trouble either getting
I'm using Devise for the first time with rails, and I'm having trouble with
I just started using Rails a few days ago, and I'm having trouble with
I'm having trouble sending mail using SMTP from a Rails app. I have a
I'm a jquery/rails newbie and I'm having trouble using .sortable(). I have expandable rows
I am using Aptana Studio 3 and having trouble creating a rails project in
I'm having trouble using the following @font-face declaration to work with my Rails 3.1
I'm having trouble creating a new model row in the database using ActiveRecord in
I'm having trouble connecting to the database for my Rails app using pgAdmin. I
I'm very new to Rails (and Ruby), and am having trouble installing and using

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.