Class: Formular::Element::ErrorNotification

Inherits:
Formular::Element show all
Defined in:
lib/formular/elements.rb

Constant Summary

Constants inherited from Formular::Element

Container, Control, Div, Fieldset, Legend, P, Small, Span, Wrapped

Instance Attribute Summary

Attributes inherited from Formular::Element

#builder, #html_blocks, #options, #tag

Instance Method Summary collapse

Methods inherited from Formular::Element

add_option_keys, #attributes, call, html, #initialize, process_option, rename_html_context, set_default, tag, #to_html

Constructor Details

This class inherits a constructor from Formular::Element

Instance Method Details

#builder_errors?Boolean

Returns:

  • (Boolean)


125
126
127
128
# File 'lib/formular/elements.rb', line 125

def builder_errors?
  return false if builder.nil?
  !builder.errors.empty?
end

#error_messageObject



121
122
123
# File 'lib/formular/elements.rb', line 121

def error_message
  options[:message] || 'Please review the problems below:'
end