Strange problem with Rails and Tomcat

Hi all,
I´m having a strange problem in my rails app hosted on Tomcat:
The ‘div’ element which stores the validation errors of a model doesn´t
seem to be ‘refreshed’ after each request,so I end up with the following
problem:

In the first request:‘5 problems ocurred’
In the second request:‘10 problems ocurred’

and so on…

Can someone spot what could be the problem?
Thanks,
Rafael R.

Are you updating that DIV with javascript?

On Wed, Aug 5, 2009 at 8:17 AM, Rafael R. <
[email protected]> wrote:

and so on…

Can someone spot what could be the problem?
Thanks,
Rafael R.

Posted via http://www.ruby-forum.com/.

Jim
http://www.thepeoplesfeed.com/contribute

No,I´m not.

I´m just putting <%= error_messages_for :my_model%> in all the views
that requires validation…

I think I know where the problem is:

For some reason(not worth mentioning) I have to validate the model as
follows:

errors.each do |error|
@model.errors.add_to_base(error.to_s)
end

so I think the ‘errors’ attribute isn´t being cleared after each
request.How could I do this?

I tried to make:
@model.errors.clear

but no effect at all…