Module: NotifyHelper

Defined in:
app/helpers/notify_helper.rb

Instance Method Summary collapse

Instance Method Details

#invited_to_description(source) ⇒ Object


12
13
14
15
16
17
18
19
20
21
22
# File 'app/helpers/notify_helper.rb', line 12

def invited_to_description(source)
  default_description =
    case source
    when Project
      s_('InviteEmail|Projects are used to host and collaborate on code, track issues, and continuously build, test, and deploy your app with built-in GitLab CI/CD.')
    when Group
      s_('InviteEmail|Groups assemble related projects together and grant members access to several projects at once.')
    end

  (source.description || default_description).truncate(200, separator: ' ')
end

8
9
10
# File 'app/helpers/notify_helper.rb', line 8

def issue_reference_link(entity, *args, full: false)
  link_to(entity.to_reference(full: full), issue_url(entity, *args))
end

4
5
6
# File 'app/helpers/notify_helper.rb', line 4

def merge_request_reference_link(entity, *args)
  link_to(entity.to_reference, merge_request_url(entity, *args))
end