Module: TitleWithErrorPrefixHelper

Defined in:
app/helpers/title_with_error_prefix_helper.rb

Instance Method Summary collapse

Instance Method Details

#title_with_error_prefix(title, error:, error_prefix: Govuk::Components.config.default_error_prefix) ⇒ Object



2
3
4
# File 'app/helpers/title_with_error_prefix_helper.rb', line 2

def title_with_error_prefix(title, error:, error_prefix: Govuk::Components.config.default_error_prefix)
  "#{error_prefix if error}#{title}"
end