File tree 1 file changed +21
-1
lines changed
1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -374,9 +374,29 @@ Each of these options are available for every delivery method (individual or bul
374
374
375
375
* `config.if` — Intended for a lambda or method; runs after the `wait` if configured; cancels the delivery method if returns falsey
376
376
* `config.unless` — Intended for a lambda or method; runs after the `wait` if configured; cancels the delivery method if returns truthy
377
+
378
+ The following are evaluated in the context of the Notification so it can be customize to the recipient :
379
+
377
380
* `config.wait` — (Should yield an `ActiveSupport::Duration`) Delays the job that runs this delivery method for the given duration of time
378
381
* `config.wait_until` — (Should yield a specific time object) Delays the job that runs this delivery method until the specific time specified
379
- * `config.queue` — Sets the ActiveJob queue name to be used for the job that runs this delivery method
382
+ * `config.queue` — Sets the ActiveJob queue name to be used for the job that runs this delivery method.
383
+
384
+ When using a symbol, the matching method must be defined inside the `notification_methods` block :
385
+
386
+ ` ` ` ruby
387
+ # app/notifiers/message_notifier.rb
388
+ class MessageNotifier < Noticed::Event
389
+ deliver_by :delivery_method do |config|
390
+ config.queue = :queue
391
+ end
392
+
393
+ notification_methods do
394
+ def queue
395
+ "high_priority"
396
+ end
397
+ end
398
+ end
399
+ ` ` `
380
400
381
401
# ## 📨 Sending Notifications
382
402
You can’t perform that action at this time.
0 commit comments