【文件属性】:
文件名称:activenotifier:用于向用户发送通知的库
文件大小:17KB
文件格式:ZIP
更新时间:2021-06-06 23:56:39
Ruby
主动通知程序
ActiveNotifier 使通过不同渠道(推送通知、websockets、电子邮件等)向最终用户发送通知变得容易。
依赖关系
ActiveNotifier 通过使用队列无关。
它不依赖于 Rails,所以应该可以在其他 ruby 项目中使用 gem。
用法
此通知程序将尝试通过推送或直接电子邮件发送有效负载:
class LikesController < ApplicationController
def create
@like = Like . create ( like_params )
if @like . persisted?
LikeNotifier . deliver_later ( {
recipient : @like . recipient ,
like : @like ,
【文件预览】:
activenotifier-master
----.gitignore(820B)
----Guardfile(3KB)
----.document(55B)
----.rspec(8B)
----CHANGELOG.md(569B)
----LICENSE.txt(1KB)
----spec()
--------acceptance()
--------app()
--------spec_helper.rb(607B)
--------activenotifier_spec.rb(98B)
----README.md(4KB)
----VERSION(5B)
----lib()
--------active_notifier()
--------active_notifier.rb(183B)
----Gemfile(500B)
----Rakefile(1KB)
----activenotifier.gemspec(3KB)
----Gemfile.lock(4KB)