【文件属性】:
文件名称:acts_as_notificable:为 ActiveRecord 对象添加通知
文件大小:38KB
文件格式:ZIP
更新时间:2021-06-28 16:46:56
Ruby
应通知的行为
为 ActiveRecord 对象添加通知
:warning: 这个还在开发中
安装
添加你的 Gemfile
gem 'acts_as_notificable'
然后运行
bundle install
将Notification模型复制到您的应用程序并创建迁移使用
rails generate acts_as_notificable:install
然后迁移
rake db:migrate
用法
为要添加通知的模型添加acts_as_notificable
class User < ActiveRecord xss=removed xss=removed> 0
要创建新的通知模板,请添加一个文件
【文件预览】:
acts_as_notificable-master
----.travis.yml(80B)
----Rakefile(583B)
----Gemfile(544B)
----spec()
--------support()
--------acts_as_notificable_spec.rb(182B)
--------dummy()
--------generators()
--------notification_spec.rb(1KB)
--------spec_helper.rb(1KB)
----.gitignore(165B)
----lib()
--------acts_as_notificable()
--------tasks()
--------acts_as_notificable.rb(250B)
--------generators()
----README.md(2KB)
----MIT-LICENSE(1KB)
----acts_as_notificable.gemspec(1KB)