• 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.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!