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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:50:35+00:00 2026-05-22T12:50:35+00:00

Am using the Devise plugin for user sign-in. I want to to display an

  • 0

Am using the Devise plugin for user sign-in. I want to to display an ‘edit’ link to the user in this code block so it only displays to users who are logged in so they can change their account password and email address. How do I do it within this code block?

The rake route is: /users/edit(.:format) {:controller=>"devise/registrations", :action=>"edit"}

    <div id="user_nav">
      <%= link_to "Home  |   ", root_path %>
      <% if user_signed_in? %>
        Signed in as . Not you?
        <%= link_to "Sign Out", destroy_user_session_path %>
    <% else %>
        <%= link_to "Sign Up", new_user_registration_path %> or
        <%= link_to "Sign In", new_user_session_path %>
    <% end %>
</div>
  • 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-22T12:50:36+00:00Added an answer on May 22, 2026 at 12:50 pm

    Just a shot in the dark…

    update_user_registration_path
    

    However…if you use

    rake routes
    

    you’ll get a list of valid routes and the string that leads off the output + the string “_path” after it should map to what you want.

    On our app we’ve disabled the devise/registrations controller so I can’t just check for you or I would have done that :/ But here is the line of output from rake routes for one of the session ones:

    new_user_session GET    /logins/sign_in(.:format)  {:action=>"new", controller=>"devise/sessions"}
    

    In this case, the string of interest is “new_user_session”. Add _path and you wind up with the method you used in your example to log in…

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

Sidebar

Related Questions

By using devise for user_auth it sets up some default routes (e.g. /user/edit and
Using the current rails 2 I want users to be able to create an
Would Devise still be useful if I'm using sign on with google? that is,
I'm using OmniAuth + Devise to allow users to register using Facebook/Twitter/Gowalla/etc attached to
I'm using the devise authentication plugin under rails 3. At the moment, I have
I'm using the devise authentication plugin under rails 3. At the moment, I have
I am using devise plugin in my new Rails App. My issue is devise
I'm using Devise for user registration. It automatically gives me the form for a
I'm using devise to do the new user registration. Right after a new user
I'm using Devise for user authentication and basic authentication. Let's say I have defined

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.