rails 常用套件 — pundit(權限管理套件)

套件來源: https://github.com/varvet/pundit

起手式:gemfile放入、bundle

接著看手冊一步一步的往下走,執行下面指令,似乎是新增了一個 policy

rails g pundit:install

常用 Gem - Faker 幫你產生假資料

step 1 : https://rubygems.org/?locale=zh-TW 搜尋

step 2: gem install faker -v 1.6.3 ,如果是放在 rails 裡就去 Gemfile 的開發區放 gem ‘faker’, ‘~> 1.6’, ‘>= 1.6.3’ (上線後你應該是不會用假資料ㄅ (?))

step 3: require ‘faker’

CodeForMyself
CodeForMyself
SomeThingAboutCode/Cat/Murmur
More information
Followers
4
Elsewhere