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

  • Home
  • SEARCH
  • 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 4048946
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T13:52:56+00:00 2026-05-20T13:52:56+00:00

I am adding a functionality of resetting password in my rails application In my

  • 0

I am adding a functionality of resetting password in my rails application

In my users page , i have all the users listing

If i am logging in as a admin below the users a link to reset password to users are available which will set a default password to them

  <%= link_to "Reset Password",reset_password_user_path  %>

In my controller users

    def reset_password

     @user = params[:user]
     puts "which user #{@user}"
     @user.password = "12345"
  if @user.save
    flash[:notice] = "Password successfully reseted"
    redirect_to user_path
  else
    flash[:error]= "Password not reste!"
    redirect_to user_path
  end

  end

In my routes

   map.resources :users, :member => {:reset_password => :post}

When i run my users page , i am getting the error as below

  reset_password_user_url failed to generate from {:action=>"reset_password", :controller=>"users"} - you may have ambiguous routes, or you may need to supply additional parameters for this route.  content_url has the following required parameters: ["users", :id, "reset_password"] - are they all satisfied?

WHen i gave the link as

   <%= link_to "Reset Password",reset_password_user_path(user)  %>

then i am getting the error as No action respond to 2

  Processing UsersController#2 (for 127.0.0.1 at 2011-03-14 11:38:33) [GET]
   Parameters: {"action"=>"2", "id"=>"reset_password", "controller"=>"users"}

How to resolve this..

  • 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-20T13:52:57+00:00Added an answer on May 20, 2026 at 1:52 pm

    Alternatively <%= link_to "Reset Password", reset_password_user_path(user), :method => "post" %> assuming you have Prototype or jQuery.

    This way you are still posting to the action as it makes changes to the user.

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

Sidebar

Related Questions

I've been tasked with adding functionality to an existing ASP.net Form Application. Users are
I'm adding some functionality to my site so that users can upload their own
I am adding functionality to a legacy web application such that in certain circumstances
I'm adding autosave functionality to a graphics application in Java. The application periodically autosaves
I'm looking at adding scripting functionality to an existing codebase and am weighing up
In the example module below, the getters and setters are generated by adding anonymous
I will be adding new pages and adding functionality to current pages. I would
I'm currently in the process of adding functionality to an existing J2EE webapp, in
I can solve the problem of adding functionality by adding sub classing then why
I'm adding some functionality to an existing 'popup' in an ASP.NET website. The popup

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.