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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:44:04+00:00 2026-05-23T03:44:04+00:00

I am working through the Ruby-on-Rails3 Tutorial Chapter 8. I have created a form

  • 0

I am working through the Ruby-on-Rails3 Tutorial Chapter 8.

I have created a form that a user submits to sign up to a site.

The validations are set in the model. They have been tested and are working.

The problem is that when I display the validation error messages doing the following:

    <% if @user.errors.any? %>
    <div id="error_explanation">
        <h2>
            <%= pluralize(@user.errors.count, "error")%>
            prohibited this user from being saved:  
        </h2>
        <p>There were problems with the following fields:</p>
        <ul>
        <%= @user.errors.full_messages.each do |message| %>
            <li><%= message %></li>
        <% end %>
        </ul>   
    </div>

<% end %>

I not only get the validation messages but the actual array is shown as well:

2 errors prohibited this user from being saved:

There were problems with the following fields:

    Password can't be blank
    Password is too short (minimum is 6 characters)
    **["Password can't be blank", "Password is too short (minimum is 6 characters)"]**

For the life of me I can’t figure out why.
Anyone know how to stop this from displaying?

Thanks in advance.

This is Rails3.0.7 Ruby 1.9.2 OSX10.6

  • 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-23T03:44:04+00:00Added an answer on May 23, 2026 at 3:44 am

    My bad I used

    <%=@user.errors.full_messages.each do |message|%> 
    

    instead of

    <% @user.errors.full_messages.each do |message|
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working through the Ruby on Rails Tutorial at http://railstutorial.org/ , chapter 4, listing
I am working through chapter 1 of the Ruby on Rails 3 Tutorial I
I am working through the ruby on rails tutorial. I have all of the
I'm new to Ruby, and have been working my way through Mr Neighborly's Humble
I have a Ruby on Rails app that I'm working on and I'm having
I'm working through the Ruby on Rails tutorial and just made a Comment model
I'm working through the Ruby on Rails 3 Tutorial: Learn Rails by Example by
I am working through M. Hartl's Ruby on Rails Tutorial screen casts, which involve
I am currently working through http://ruby.railstutorial.org/chapters/sign-in-sign-out#sec:current_use r] 1 and I am having trouble understanding
I'm working through the Ruby on Rails Tutorial and I'm getting stuck on the

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.