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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:17:53+00:00 2026-06-16T01:17:53+00:00

I need two kinds login if they refer to different controllers, example: site.com/consumers site.com/panel

  • 0

I need two kinds login if they refer to different controllers, example:

site.com/consumers
site.com/panel

site.com/consumers login is to make comments and site.com/panel is for the administrative part of advertisers and users.

I’m all consumers and advertisers in the same table users in the database.

Could anyone help me to make two logins do validation on the same table and after login, sends to different views and controllers?

In my route I was trying to use:

devise_for :panel, :class_name => "User"

But the layout of the login is the same, and would need to be different.

== UPDATE ==

I have three classes of people.
1) Consumer
2) advertiser
3) Administrator

The records are in the same table. But each record has a column “type” arrow you like (consumer, advertiser or administrator) So far I’ve managed to solve.

The problem is this:

When the user accesses via: http://www.site.com/comment
This user can login to make a comment on the site.

When the user accesses via: http://www.site.com/panel
This user can login to access the panel from him, he may be, (consumer, advertiser or administrator).

I would like to make two types of logins, one for / comment with the layout of the site and one for the / panel with the panel layout, but doing validation on the same table, in this case (Users).

  • 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-16T01:17:55+00:00Added an answer on June 16, 2026 at 1:17 am

    Your question is a little hard to understand. It looks like your using devise. I am not sure if you are trying to use two different models, and have two different kinds of devise users, perhapse with different permissions? Or if you are trying to direct people to different pages depending on who they are after they login?

    I would recommend you checkout after_sign_in_path in devise. You can define it in your application controller. If you are trying to send someone back to a different section of the site depending on where they signed in you could set a session variable and then use it in that function to decide where to send someone.

    If you rewrite your question I will try and give a better answer.

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

Sidebar

Related Questions

I have two tables containing two different kinds of comments. One of the tables
I've two kinds of webservices: webservices that need the request to be validated others
I need a way for a single variable to represent two kinds of objects
I have a Maven multi-module project and I need two different parent POMs in
I have a need for two slightly different classes, that have the same members,
I am developing a REST API that supports two kinds of authentication protocols: login
In my specific case, I have two kinds of messages that I need to
I have got two models, User and Event. I need two kind of relationship
I need two comparisons in my Sql server, One between Dates and One between
I need two methods one to encrypt and one to decrypt an xml file

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.