Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • Project Forum Project Forum
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 104
    • Issues 104
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 6
    • Merge requests 6
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Terraform modules
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • EIPEIP
  • Project ForumProject Forum
  • Project ForumProject Forum
  • Wiki
  • Notifications

Notifications · Changes

Page history
Update Notifications authored Jun 08, 2021 by Taico Aerts's avatar Taico Aerts
Hide whitespace changes
Inline Side-by-side
Notifications.md
View page @ 43157a32
......@@ -35,14 +35,14 @@ To add notifications to a particular controller, add `include Notifyable` to the
def send_notifications
log_event(
@project,
nil,
:destroy,
additional_param: some_value,
url: url_to_item
).notify(user_or_list_of_users, as: :something)
end
```
If this function is called from the destroy method, then it will look for all the keys under `projects.destroy.something` or, if that does not exist, `projects.default.something`. It will then attempt to send a notification to `user_or_list_of_users`. If the url parameter is given, the notification on Project Forum will include a clickable link to the given url as `view <name of resource>`.
If this function is called, then it will look for all the keys under `projects.destroy.something` or, if that does not exist, `projects.default.something`. It will then attempt to send a notification to `user_or_list_of_users`. If the url parameter is given, the notification on Project Forum will include a clickable link to the given url as `view <name of resource>`.
### Variables
Messages can include variables of the form `%{variable_name}`, which are passed to the log_event method as the additional_param values. Each of these params must have a string value.
......
Clone repository
  • Cleanup after approval
  • Code Quality
  • Database Setup
  • Deployment
  • Elasticsearch Setup
  • Events
  • Home
  • Installation on Windows
  • Interesting features
  • Notifications
  • Overview of notifications
  • SAML
  • Thesis Workflow