Hi,
I am familiar with the “errors.add” on the model and use this to display
errors to the user.
I have some processing in the controller that can generate errors before
I get to the point where I pass control to the model.
I want to raise errors and display an error panel on the user’s screen,
in a similar fashion to <%= error_messages_for ‘model’ %>.
Can this be done?
I tried to get around this using a partial but I misunderstood. I wrote
a partial and, when I get the errors I can display this. However, I’d
hoped it would display in the main page for the action but it just
displays on its own. I realise I’m just misunderstanding how it works as
I get up to speed, but any pointers would be great…
I expect there is a nice way to include a template inside another based
on a condition in the controller, I just don’t know what it is!
Thanks!