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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:49:46+00:00 2026-06-05T22:49:46+00:00

As the title states, I am using devise. I came upon this link that

  • 0

As the title states, I am using devise. I came upon this
link that describes the process of doing this.
I have this users controller:

    def update_password
      @user = User.find(current_user.id)
      #raise @user.to_yaml
      if @user.update_attributes(params[:user])
        # Sign in the user by passing validation in case his password changed
        sign_in @user, :bypass => true
        #flash[:notice] = "Password Successfully Changed"
        redirect_to settings_path
      else
        flash[:notice] = @user.errors.full_messages
        render password_path
      end
    end

Ignore the #raise @user.to_yaml.
And this view:

        <h1>Change Password</h1>

        <%= form_for(:user, :url => { :action => 'update_password'}) do |f| %>
            <div>
                <%= f.label :current_password %>
                <%= f.password_field :current_password %>
            </div>

            <div>
                <%= f.label :password %>
                <%= password_field_tag :password %>
            </div>

            <div>
                <%= f.label :password_confirmation %>
                <%= f.password_field :password_confirmation %>
            </div>

          <div>
                <%= f.submit "Change Password" %>
            </div>
        <% end %>

I have that view mapped to this controller method :

   def password
      @user = current_user
    end

To separate the action and the view, and my config/routes.rb is this:
match '/password' => 'users#password', :as => 'password'

The problem arises when I click on the “Change Password” button from the form.
This is the link it brings me to: “http://localhost:3000/assets?action=update_password&controller=users&#8221; and I get the error “Couldn’t find User with id=assets”

I have no idea as to why its acting in this manner and what I’m doing wrong because I have copied what the webpage said. Has anyone had any experience with this and can aid me? 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-06-05T22:49:47+00:00Added an answer on June 5, 2026 at 10:49 pm

    If you are using Rails 3 or newer you could setup your routes using the resource syntax:

    resources :users do
      member do # These routes will apply to specific model instances
        get 'password' # /users/:id/password
        put 'update_password' # /users/:id/updated_password
      end
    end
    

    then you would be able to use a path helper in your form_for declaration

    <%= form_for @user, :url => update_password_user_path(@user) do |form| %>
    ...
    <% end %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

so as the title states, using the following code I have got it populating
As the title states, I have a C# console app which uses interop to
I have a mobile webapp that I am developing using jquery mobile. I am
I have a java application that will run on Windows 7 (using Swing, App
As the title states, I am looking for something, that will help me automate
as the title states, I am trying to add two floats using javascript/jquery, and
Exactly like my title states i need a query that removes the first chracter
As the title states, I want to group some ColumnSeries, I'm using Silverlight Charting
As the title states, is anyone else facing memory management problems when using Xcode
As the title states, If I have a jQuery listener tied to an HTML

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.