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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:25:10+00:00 2026-05-25T23:25:10+00:00

I am trying to use OmniAuth, and according to Ryan Bates, I should override

  • 0

I am trying to use OmniAuth, and according to Ryan Bates, I should override the Devise Registration controller by specifying the following devise_for scope in my routes.rb file:

devise_for :users, :controllers => {:registrations => 'registrations'}

However, according to Devise's documentation, if I am to customize the path_names, so instead of doing mydomain.com/users/sign_up/, I can do mydomain.com/register, I would have to do something like this:

devise_for :users, :path_names => { :sign_up => "register", :sign_in => "login", :sign_out => "logout", :settings => "settings", :newpass => "newpass", :changepass => "changepass" }

I tried to chain both of them like this:

devise_for :users, :controllers => {:registrations => 'registrations'}, :path_names => { :sign_up => "register", :sign_in => "login", :sign_out => "logout", :settings => "settings", :newpass => "newpass", :changepass => "changepass" }

But that doesn’t work. In order for me to go to the view in my views/registrations/new.html.erb, I have to go to mydomain.com/users/register. If I go to mydomain.com/register it still serves it from /views/devise/registrations/new.html.erb.

How do I get mydomain.com/register to point to /views/registrations/new.html.erb?

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-05-25T23:25:10+00:00Added an answer on May 25, 2026 at 11:25 pm

    Write this in you routes file instead of adding :path_name

    devise_scope :user do
       get "register", :to => "devise/registrations#new"
       get "login", :to => "devise/sessions#new"
       get "logout", :to => "devise/sessions#destroy"
    end
    

    _edit2__

    If you want to override the controllers then you need to copy the devise controller folder from your gem into your application under app/controllers. In this case You also need to write below lines in routes.rb file. If you don’t want to override the default functionality for devise controllers then there is no need to adding below lines in routes.rb file.

    devise_for :users, :controllers => {
          :registrations => 'devise/registrations',
          :sessions => 'devise/sessions',
          :passwords => 'devise/passwords',
          :confirmations => 'devise/confirmations',
          :unlocks => 'devise/unlocks'
      }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying use mod_rewrite to rewrite URLs from the following: http://www.site.com/one-two-file.php to http://www.site.com/one/two/file.php The
trying to use hibernate with my web app and getting following exception: Initial SessionFactory
I'm trying to use OmniAuth in a sinatra app with google as the login
I am trying to use an OmniAuth (0.2.6) strategy for my application. The architecture
I'm currently trying to use omniauth in my rails application. I was just curious,
I am trying to use this railscast episode to provide authentication via twitter http://railscasts.com/episodes/235-omniauth-part-1
I am new to Rails and I am trying to use omniauth with rails
I revieving the following error when trying use mysql_real_escape() function Fatal error: Call to
i'm trying use facebook API to upload photo in my fan page. I downloaded
I am trying use gem tire to search in my application. I have tables

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.