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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:06:25+00:00 2026-06-10T17:06:25+00:00

In my current Ruby on Rails project, the devise plugin has been used for

  • 0

In my current Ruby on Rails project, the devise plugin has been used for authentication. To change the password, I added the devise plugin’s passwords/edit.html.erb file into the user directory in my project. Everything’s working fine except the error messages are not showing.

This is my current update_password method

def update_password
    @user = User.find(current_user.id)
    if @user.update_with_password(params[:user])
      sign_in @user, :bypass => true
      redirect_to root_path
    else
      render "edit"  
    end
  end

I’ve mentioned the require validation in the user model as follows

validates_presence_of :name, :primary_locale, :current_password, :password, :password_confirmation

This is my edit form code:

<div id="loginForm" class="editPwFormHeight">
    <div id="loginHeader"><h3><%= image_tag("wif_small.png"); %></h3></div>
    <div id="loginContent">
        <%= form_for(@user, :url => { :action => "update_password", :locale => params[:locale] }, :method => "post") do |f| %>
                <%= f.hidden_field :reset_password_token %>
            <p><%= f.password_field :current_password, :class => "login_txt", :placeholder => I18n.t('wi.common.enterCurrentPw'), :autocomplete => "off" %></p>
            <p><%= f.password_field :password, :class => "login_txt", :placeholder => I18n.t('wif.common.newPw'), :autocomplete => "off"  %></p>
            <p><%= f.password_field :password_confirmation, :class => "login_txt", :placeholder => I18n.t('wif.common.confirmPw'), :autocomplete => "off" %></p>
            <p>
                <input id="user_submit" name="commit" type="submit" value="<%= I18n.t('wif.common.updatePw') %>" class="login_btn" /> 
                <input id="user_cancel" name="commit" type="button" value="<%= I18n.t('wif.common.cancel') %>" class="login_btn" />
            </p>
        <% end %>
    </div>
</div>

Anyone can help me to solve this issue. I wanted to show the error message if the user has not typed the current password, or any other error which are currently supporting by the devise

  • 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-10T17:06:27+00:00Added an answer on June 10, 2026 at 5:06 pm

    You need to add the following line to your template:

    <%= devise_error_messages! %>
    

    You can customise the messages themselves by editing Devise’s translation files, e.g. config/locales/devise.en.yml

    If you’re not using devise’s built-in controllers, then you will need to register the DeviseHelper module as a helper in your controller using the helper method.

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

Sidebar

Related Questions

In my ruby on rails project, I am using devise as the authentication plugin.
I am working in a Ruby on Rails project which has implemented authentication mechanism
I'm using Devise for authentication in Ruby on Rails and I'm overriding the registration
In my current ruby on rails project, I am using webrick (default) server for
Short and sweet, Is it ok to use (current version) Ruby 1.9.1 with Rails
I'm working on a Ruby on Rails project and sometimes I need to run
I am using capistrano to deploy my Ruby on Rails project. I am on
Using Ruby on Rails 3's new routing system, is it possible to change the
I have been trying to get a ruby on rails app going on my
I am trying to create a Redmine plugin built on Ruby on Rails. I

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.