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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T12:01:46+00:00 2026-06-07T12:01:46+00:00

I have a custom user like such: class PersonsController < UsersController end However, after

  • 0

I have a custom user like such:

class PersonsController < UsersController

end

However, after signing in just fine, when I click “persons/edit”, I get redirected to the login page… I can see in the logs the following:

Processing by Person::RegistrationsController#edit as HTML Completed
401 Unauthorized in 0ms

Then I get redirected to the Login page again, I didn’t lose the session at this point, I could click back on my profile and see the account details.

Just not sure why Devise has issues with the Edit action

I also have the following structure in my registration controller

class Person
     class RegistrationsController < Devise::RegistrationsController
     end
end

Any help, it’s appreciated it. 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-07T12:01:48+00:00Added an answer on June 7, 2026 at 12:01 pm

    Actually I found the solution, I had to redefine this method in my custom Person::RegistrationsController

    def authenticate_scope!
      send(:"authenticate_user!", :force => true)
      self.resource = send(:"current_user")
    end
    

    It seems the session doesn’t have a custom “current_person” method, but always a current_user because I’m login in with ‘users/sign_in’ (I wanted a common login point for other custom users in my system). If I login with ‘persons/sign_in’ then this workaround is not needed. For some reason. Im not really sure why, this was the original method from devise’s github repo:

    def authenticate_scope!
      send(:"authenticate_#{resource_name}!", :force => true)
      self.resource = send(:"current_#{resource_name}")
    end
    

    I hope this helps someone in the future, regards.

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

Sidebar

Related Questions

I have a custom user control extending the Listbox class. Inside of it I
I have a custom base user control in silverlight. <UserControl x:Class=Problemo.MyBaseControl xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml xmlns:d=http://schemas.microsoft.com/expression/blend/2008
My site is completely custom, as such I like to know when I have
I have a custom user control on my windows forms. This control has a
I have a custom user control called ErrorNotificationBox. To place that on my page
I have 2 views (first view - custom user control, MainWindow view - main
I have a custom Sharepoint 2010 web part that runs the user through a
I have a model Whitelabel and a User has_many :whitelables I have a custom
Please help me to turn off user interaction. I have a custom view which
I have created a custom subclass of UITableViewCell. There, I allow the user to

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.