Method: SimpleForm::FormBuilder#error_notification
- Defined in:
- lib/simple_form/form_builder.rb
#error_notification(options = {}) ⇒ Object
Creates an error notification message that only appears when the form object has some error. You can give a specific message with the :message option, otherwise it will look for a message using I18n. All other options given are passed straight as html options to the html tag.
Examples
f.error_notification
f.error_notification message: 'Something went wrong'
f.error_notification id: 'user_error_message', class: 'form_error'
346 347 348 |
# File 'lib/simple_form/form_builder.rb', line 346 def error_notification( = {}) SimpleForm::ErrorNotification.new(self, ).render end |