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:
authorgfyoung <gfyoung17@gmail.com>2018-08-18 14:19:57 +0300
committergfyoung <gfyoung17@gmail.com>2018-09-07 03:33:46 +0300
commit1993a4449a5be44acfa5a9e1a94842e05da5edd5 (patch)
tree80a38bd0b427a5baf7ca36a3a71f8eb75c9d912f /app/helpers/application_helper.rb
parent07d5ee361a438fcfff28fe184bbec2aa98ce5d14 (diff)
Enable frozen string for app/helpers/**/*.rb
Partially addresses #47424.
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r--app/helpers/application_helper.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 0190aa90763..bb7ae03313c 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'digest/md5'
require 'uri'
@@ -106,11 +108,11 @@ module ApplicationHelper
#
# Returns an HTML-safe String
def time_ago_with_tooltip(time, placement: 'top', html_class: '', short_format: false)
- css_classes = short_format ? 'js-short-timeago' : 'js-timeago'
- css_classes << " #{html_class}" unless html_class.blank?
+ css_classes = [short_format ? 'js-short-timeago' : 'js-timeago']
+ css_classes << html_class unless html_class.blank?
element = content_tag :time, l(time, format: "%b %d, %Y"),
- class: css_classes,
+ class: css_classes.join(' '),
title: l(time.to_time.in_time_zone, format: :timeago_tooltip),
datetime: time.to_time.getutc.iso8601,
data: {