Class: CaseForm::Element::ComplexError
- Defined in:
- lib/case_form/element/errors/complex_error.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#generate ⇒ Object
Generate all error messages as HTML <ul> list with optional header and message.
Methods inherited from Base
Methods included from CaseForm::ElementExt::Naming
#object_human_model_name, #sanitized_object_name, #singularize_model_name
Constructor Details
This class inherits a constructor from CaseForm::Element::Base
Instance Method Details
#generate ⇒ Object
Generate all error messages as HTML <ul> list with optional header and message.
8 9 10 11 12 13 14 15 |
# File 'lib/case_form/element/errors/complex_error.rb', line 8 def generate contents = [] contents << template.content_tag(header_tag, ) unless [:header_message] == false contents << template.content_tag(, ) unless [:message] == false contents << template.content_tag(:ul, ) template.content_tag(error_tag, contents.join.html_safe, ) end |