diff options
Diffstat (limited to 'app/helpers/tab_helper.rb')
-rw-r--r-- | app/helpers/tab_helper.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/helpers/tab_helper.rb b/app/helpers/tab_helper.rb index ee701076a14..e310fda51d7 100644 --- a/app/helpers/tab_helper.rb +++ b/app/helpers/tab_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module TabHelper # Navigation link helper # @@ -47,9 +49,7 @@ module TabHelper # Add our custom class into the html_options, which may or may not exist # and which may or may not already have a :class key o = options.delete(:html_options) || {} - o[:class] ||= '' - o[:class] += ' ' + klass - o[:class].strip! + o[:class] = [*o[:class], klass].join(' ').strip if block_given? content_tag(:li, capture(&block), o) |