Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Action errors and a message

 
Javier Pascual
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let's say I have an action which can generate some action errors, and I want to print these errors in the view.

I could use the actionError tag to do this, but, is there a parameter or something to be able to add a message like "These errors occurred" only when you have errors?

Or should I use hasActionErrors() and s:iterator to print the action errors by myself?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use an "if" to see if there are errors and display an error message if there are.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic