Project

General

Profile

Feature #32030 » 0001-Code-cleanup-RuboCop-Fix-Performance-RedundantMerge.patch

Go MAEDA, 2019-12-01 05:25

View differences:

.rubocop_todo.yml
541 541
  Exclude:
542 542
    - 'app/controllers/issues_controller.rb'
543 543
    - 'app/helpers/application_helper.rb'
544
    - 'app/helpers/avatars_helper.rb'
545 544
    - 'app/helpers/custom_fields_helper.rb'
546 545
    - 'app/helpers/workflows_helper.rb'
547 546
    - 'app/models/auth_source_ldap.rb'
app/helpers/avatars_helper.rb
23 23
  def assignee_avatar(user, options={})
24 24
    return '' unless user
25 25

  
26
    options.merge!(:title => l(:field_assigned_to) + ": " + user.name)
26
    options[:title] = l(:field_assigned_to) + ': ' + user.name
27 27
    avatar(user, options).to_s.html_safe
28 28
  end
29 29

  
30 30
  def author_avatar(user, options={})
31 31
    return '' unless user
32 32

  
33
    options.merge!(:title => l(:field_author) + ": " + user.name)
33
    options[:title] = l(:field_author) + ': ' + user.name
34 34
    avatar(user, options).to_s.html_safe
35 35
  end
36 36

  
......
38 38
  # +user+ can be a User or a string that will be scanned for an email address (eg. 'joe <joe@foo.bar>')
39 39
  def avatar(user, options = { })
40 40
    if Setting.gravatar_enabled?
41
      options.merge!(:default => Setting.gravatar_default)
41
      options[:default] = Setting.gravatar_default
42 42
      options[:class] = GravatarHelper::DEFAULT_OPTIONS[:class] + " " + options[:class] if options[:class]
43 43
      email = nil
44 44
      if user.respond_to?(:mail)
(5-5/6)