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, OptGroup, Option, P, Small, Span, WrappedControl

Instance Attribute Summary

Attributes inherited from Formular::Element

#attributes, #builder, #html_blocks, #options, #tag

Instance Method Summary collapse

Methods inherited from Formular::Element

add_option_keys, call, html, #initialize, 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)


113
114
115
116
# File 'lib/formular/elements.rb', line 113

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

#error_messageObject



109
110
111
# File 'lib/formular/elements.rb', line 109

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