easy_roles:轻松管理Rails的角色

时间:2021-03-06 19:56:20
【文件属性】:
文件名称:easy_roles:轻松管理Rails的角色
文件大小:14KB
文件格式:ZIP
更新时间:2021-03-06 19:56:20
Ruby 简单角色 简单的rails gem,用于基本角色授权,并且在rails上使用ruby。 变更日志 请阅读CHANGELOG.rdoc文件。 安装 gem install easy_roles 或者可以将其安装为Rails插件。 script/plugin install git://github.com/platform45/easy_roles.git 基本设置 序列化方法 将以下内容添加到您的Gemfile中: gem 'easy_roles' 然后生成迁移: rails g easy_roles user roles 或在用户模型中添加“角色”列,并将默认值设置为“ — []”。 请注意,您可以根据需要将其命名为“ roles”。 t . string :roles , default: "--- []" 然后,您需要在模型中添加“ easy_roles:colum
【文件预览】:
easy_roles-master
----CHANGELOG.rdoc(1KB)
----Rakefile(447B)
----init.rb(20B)
----README.rdoc(5KB)
----Gemfile(25B)
----Gemfile.lock(794B)
----spec()
--------easy_roles_spec.rb(13KB)
--------spec_helper.rb(1KB)
----.gitignore(22B)
----lib()
--------easy_roles.rb(1KB)
--------generators()
--------methods()
----easy_roles.gemspec(2KB)

网友评论