Clearing out AR object's errors array on multiple form posts

I have a form that is POSTing to modify an ActiveRecord object @obj.

I’m using @obj.errors.add() to add to the set of errors for this form.

When I post with incorrect data, I see the error message. However, if
I post again, without changing anything, the error is being added to the
array.

Should I be calling @obj.errors.clear at the beginning of my controller
action to
ensure that I don’t keep appending to the array?

Thanks,
Wes

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs