Displaying 1 result from an estimated 1 matches for "errors_found".
2006 Mar 14
5
Unable to display errors for multiple records
...Which
is no problem at all. Problem starts when I want to introduce error
handling. The problem is that no record should be saved when one of the
records contains an error. I tried it as follows:
session[:infos].each do |info|
@quest.name = info["name"]
unless @quest.valid?
@errors_found = true
end
end
if @errors_found
render :action => ''new''
end
So if an error has occurred I prevent all the records from being saved.
The only problem I''m having is that I can only show errors from the last
record that contained an error. So if one or more of the...