Skip to content

Commit d23f3d9

Browse files
Update docs for the slack delivery method (#495)
1 parent db7d51c commit d23f3d9

File tree

1 file changed

+18
-19
lines changed

1 file changed

+18
-19
lines changed

docs/delivery_methods/slack.md

+18-19
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
1-
### Slack Delivery Method
2-
3-
Sends a Slack notification via webhook.
4-
5-
`deliver_by :slack`
6-
7-
##### Options
8-
9-
* `format: :format_for_slack` - *Optional*
10-
11-
Use a custom method to define the payload sent to Slack. Method should return a Hash.
12-
13-
* `url: :url_for_slack` - *Optional*
14-
15-
Use a custom method to retrieve the Slack Webhook URL. Method should return a String.
16-
17-
Defaults to `Rails.application.credentials.slack[:notification_url]`
18-
19-
1+
# Slack Delivery Method
2+
3+
Send a Slack message to notify users in a channel.
4+
5+
## Usage
6+
7+
```ruby
8+
class CommentNotification
9+
deliver_by :slack do |config|
10+
config.url = "https://slack.com..."
11+
config.json = -> {
12+
{
13+
# ...
14+
}
15+
}
16+
end
17+
end
18+
```

0 commit comments

Comments
 (0)