app/helpers/application_helper.rb
# Render a form_for tag pointing to the update action of the current controller
Render a form_for tag pointing to the update action of the current controller
Render a form_for tag pointing to the update action of the current controller
def govuk_error_summary(form_object = @form_object)
    return unless form_object.try(:errors).present?
    content_for(:page_title, flush: true) do
      content_for(:page_title).insert(0, t('errors.page_title_prefix'))
    end
    fields_for(form_object, form_object) do |f|
      f.govuk_error_summary t('errors.error_summary.heading')
    end
  end
def govuk_error_summary ( form_object = @form_object ) return unless form_object . try ( :errors ) . present? content_for ( :page_title , flush : true ) do content_for ( :page_title ) . insert ( 0 , t ( 'errors.page_title_prefix' ) ) end fields_for ( form_object , form_object ) do | f | f . govuk_error_summary t ( 'errors.error_summary.heading' ) end end
Render a form_for tag pointing to the update action of the current controller
Render a form_for tag pointing to the update action of the current controller
# Prepend page title so screen readers read it out as soon as possible
form_object