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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:47:07+00:00 2026-05-22T01:47:07+00:00

when i follow the Devise Wiki at https://github.com/plataformatec/devise/wiki/How-To:-Change-the-default-sign_in-and-sign_out-routes , my default route names do

  • 0

when i follow the Devise Wiki at https://github.com/plataformatec/devise/wiki/How-To:-Change-the-default-sign_in-and-sign_out-routes , my default route names do not change at all, here is my code :

MyApp::Application.routes.draw do
  root :to => "profile#index"     

  devise_for :users
  namespace :user do
    root :to => "profile#index"
  end

  as :user do
  get "/login" => "devise/sessions#new"
  get "/signup" => "devise/registrations#new"
  end

The two route changes didnt work so i stopped.

How do i change it so my routes are:

/users/sign_in = /login

/users/sign_up = /signup

/users/sign_out = /signout

/users/edit = /edit

I am using Devise 1.3.4 and Rails 3.0.7.

Thank you in advance!

  • 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-22T01:47:07+00:00Added an answer on May 22, 2026 at 1:47 am

    OK i figured it out, ill just type this out to help other newbies!

    The routes themselves change but not the navigation links unless coded that way.
    try http://localhost:3000/login and http://localhost:3000/users/sign_up, they are the same thing but just have to be typed in manually.

    My new code looks like this ( navigation links & route configurations together):

    routes.rb:

    MyApp::Application.routes.draw do
    
      devise_for :users do
        root :to => "devise/registrations#new"
        get "/" => "devise/registrations#new"
        post '/' => 'registrations#new', :as => :new_user_registration 
        match '/', :to => 'devise/registrations#new'    
        get "/edit" => "devise/registrations#edit"
        match '/edit', :to => 'devise/registrations#edit'   
        get "/login" => "devise/sessions#new"
        match '/login', :to => 'devise/sessions#new'
        get "/logout" => "devise/sessions#destroy"
        match '/logout', :to => 'devise/sessions#destroy'   
      end
    
    
    
      namespace :user do
        root :to => "profile#index"
      end
    

    the views/devise/menu/_login_items.html.erb :

    <% if user_signed_in? %>
      <li>
      <%= link_to('Logout', logout_path) %>        
      </li>
    <% else %>
      <li>
      <%= link_to('Login', login_path)  %>  
      </li>
    <% end %>
    

    the views/devise/menu/_registration_items.html.erb

    <% if user_signed_in? %>
      <li>
      <%= link_to('Edit account', edit_path) %>
      </li>
    <% else %>
      <li>
      <%= link_to('Sign up', root_path)  %>
      </li>
    <% end %>
    

    I certainly hope this helps people who were lost like me and just got into both devise and RoR. it will give you a good understanding on how to get the routes to look the way you want it to be in a simple manner, yet still work. Good luck!

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

Sidebar

Related Questions

I've got an application at http://github.com/rails3book/ticketee which is currently failing when the features are
I'm working on a Rails 3 application that uses devise for user authentication. I
I am using devise to handle authentication. Overall I like it, but I'd like
I'm trying to follow Riemer's DirectX with C++ tutorial . I have made a
I have been trying to follow the example in this post . Since I
Hi I am very new rails , would need some help , there is
I am stuck on this ClassCastException error for a while now, can anyone help
I am struggling to get an Air app installed on my iPod. If I
I am building a customized add in for our CRM system. When end users

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.