diff options
author | Nick Thomas <nick@gitlab.com> | 2017-08-28 21:33:35 +0100 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2017-08-30 20:50:44 +0100 |
commit | b84ca08e351fc9238bef4e6b4bf74158d25d4f1d (patch) | |
tree | e7ec9704ec449b547b6193c5e0ba771a5aae62c2 /app/helpers/form_helper.rb | |
parent | 6847060266792471c9c14518a5106e0f622cd6c5 (diff) | |
download | gitlab-ce-b84ca08e351fc9238bef4e6b4bf74158d25d4f1d.tar.gz |
Address review comments
Diffstat (limited to 'app/helpers/form_helper.rb')
-rw-r--r-- | app/helpers/form_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/form_helper.rb b/app/helpers/form_helper.rb index 2e05b8c6d65..eeb130d5240 100644 --- a/app/helpers/form_helper.rb +++ b/app/helpers/form_helper.rb @@ -1,10 +1,10 @@ module FormHelper - def form_errors(model, headline = 'The form contains the following') + def form_errors(model, type: 'form') return unless model.errors.any? pluralized = 'error'.pluralize(model.errors.count) - headline = headline + ' ' + pluralized + ':' + headline = "The #{type} contains the following #{pluralized}:" content_tag(:div, class: 'alert alert-danger', id: 'error_explanation') do content_tag(:h4, headline) << |