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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:31:16+00:00 2026-05-16T07:31:16+00:00

I set up restful authentication and user management without any gems in Rails 3.

  • 0

I set up restful authentication and user management without any gems in Rails 3.

However, I think it’s silly to need to go to “/sessions/new” instead of “/sign_in”.

I know you can alias an entire resource, so that instead of “/sessions”-and-friends my users could use “/squirrels”-and-friends, but that’s not what I’m trying to accomplish here. I want to alias one specific action.

I know this can kind of be accomplished with

resources :sessions, :path_names => { :new => "sign_in" }

but then the route ends up as “/sessions/sign_in” — and I don’t want the controller name in there at all for this action. I wish I could specify this with

resources :sessions, :path_names => { :new => "/sign_in" }

where the “/” tells rails that it is a complete path name. But that has the same effect as the first code fragment.

My last attempt was just to use the superficial

match "sign_in" => "sessions#new"

which allows someone to manually enter “/sign_in” in their URL bar, but links made with new_session_(path|url) still land users at the more awkward “/sessions/sign_in”.

  • 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-16T07:31:17+00:00Added an answer on May 16, 2026 at 7:31 am
    match "sign_in" => "sessions#new", :as => :new_session
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've set up user auth for my rails App with Devise and Omniauth. Now
I am confused about how to set up a RESTful rails app. I have
Set<Type> union = new HashSet<Type>(s1); union.addAll(s2); AND Set <Type> union = new HashSet<Type>(); union.addAll(s1);
I set up the basic Authentication/Authorization set up, but a problem now is that
I have a set of RESTful web services. These services are protected on a
I have a RESTful API set up and working with CakePHP using mapResources() and
I know this isn't RESTful, but for now, I'm trying to set up an
I'm trying to set up some semistatic page in a rails 3 app I've
I'm facing some issues with Apache mod_proxy_balancer regarding sticky sessions. We've developped a restful
I'm trying to use WCF 4 to set up a RESTful web service. I'd

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.