Forum: Ruby on Rails 0 errors prohibited this model from being saved

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
9249736dae1898d537770886061c06f9?d=identicon&s=25 tansaku (Guest)
on 2008-11-05 17:40
(Received via mailing list)
Hi,

I just generated a scaffold for some existing models I have, and
everything is working fine, except I get a 0 error message on the edit
view:

--------
0 errors prohibited this statistic type from being saved

There were problems with the following fields:
--------

I would have thought the default behaviour would be to hide this error
message if there are no errors, and that is my impression of what
happened when I have scaffolded from scratch before.

I am using Rails 2.1.1 and the edit view looks like this:

<% form_for(@statistic_type) do |f| %>
  <%= f.error_messages %>
  <p>
    <b>Name</b><br />
    <%= f.text_field :name %>
  </p>

etc.

Has anybody every encountered this before?

It's not a huge immediate problem as all the functionality seems to be
working, it's just that it will be confusing for users ...

Many thanks in advance
CHEERS> SAM
This topic is locked and can not be replied to.