Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2017-08-28 23:33:35 +0300
committerNick Thomas <nick@gitlab.com>2017-08-30 22:50:44 +0300
commitb84ca08e351fc9238bef4e6b4bf74158d25d4f1d (patch)
treee7ec9704ec449b547b6193c5e0ba771a5aae62c2 /app/helpers/form_helper.rb
parent6847060266792471c9c14518a5106e0f622cd6c5 (diff)
Address review comments
Diffstat (limited to 'app/helpers/form_helper.rb')
-rw-r--r--app/helpers/form_helper.rb4
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) <<