Skip to content

Commit

Permalink
Add form semantic_errors usage to documentation
Browse files Browse the repository at this point in the history
Document the semantic_errors ability added in Pull request activeadmin#905

activeadmin#905
  • Loading branch information
bazlo committed Sep 10, 2013
1 parent e80686f commit fecdf57
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/5-forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,13 @@ The `:heading` option will add a custom heading to has_many form. You can hide a

The `:new_record` option will show or hide new record link at the bottom of has_many form. It is set as true by default.

## Displaying Errors

To display a list of all errors, include `semantic_errors` at top of form. Particularly useful to display errors on the base or virtual attributes.

form do |f|
f.semantic_errors *f.object.errors.keys
f.inputs
f.buttons
end

0 comments on commit fecdf57

Please sign in to comment.