Controller-tier errors


#1

Sorry for the pseudo-repost, maybe I didn’t do a good enough job
explaining it the first time around or maybe I’m an island unto myself
:wink:

So - simplified this time around:

Given the following method:

def do_login
if Account.find_some_account(foo, bar)
redirect_to :controller => ‘xxx’
else
#### I’d like to inform the user here that we’ve had an issue…
#### I could just use flash, but I’m wondering what I should do
#### if I want to report back multiple errors…is it considered
#### bad-form to return an @errors array from the controller tier?

 redirect_to :controller => 'xxx', :action => 'display_create'

end
end

Thanks for any help! Interesting to see how quickly this list moves!
Cory W.


#2

On 12/2/05, Cory W. removed_email_address@domain.invalid wrote:

 redirect_to :controller => 'xxx'

else
#### I’d like to inform the user here that we’ve had an issue…
#### I could just use flash, but I’m wondering what I should do
#### if I want to report back multiple errors…is it considered
#### bad-form to return an @errors array from the controller tier?

 redirect_to :controller => 'xxx', :action => 'display_create'

end
end

I see no reason why you couln’t put more than one error in the flash.

Good luck,

  • Rowan