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'


313
314
315
# File 'lib/simple_form/form_builder.rb', line 313

def error_notification(options = {})
  SimpleForm::ErrorNotification.new(self, options).render
end

Comments