Method: GOVUKDesignSystemFormBuilder::BuilderHelper#govuk_error_summary

Defined in:
lib/govuk_design_system_formbuilder/builder_helper.rb

#govuk_error_summary(object, object_name = nil, *args, **kwargs, &block) ⇒ Object

Renders an error summary

Examples:

= govuk_error_summary(@registration)

Parameters:

  • object (ActiveRecord::Base, ActiveModel::Model, Object)

    the object we’ll be rendering the errors for

  • object_name (Symbol) (defaults to: nil)

    the object’s name, the singular version of the object’s class name, e.g., Person is :person. If none is supplied we’ll try to infer it from the object, so it’ll probably be necessary for regular Ruby objects

  • args (Hash)

    a customizable set of options

  • kwargs (Hash)

    a customizable set of options

Options Hash (*args):

  • options (Array)

    passed through to the builder’s #govuk_error_summary

Options Hash (**kwargs):

  • keyword (Hash)

    options passed through to the builder’s #govuk_error_summary

See Also:



45
46
47
48
49
# File 'lib/govuk_design_system_formbuilder/builder_helper.rb', line 45

def govuk_error_summary(object, object_name = nil, *args, **kwargs, &block)
  (object_name = retrieve_object_name(object)) if object_name.nil?

  proxy_builder(object, object_name, self, {}).govuk_error_summary(*args, **kwargs, &block)
end