mirror of
https://github.com/varvet/pundit.git
synced 2022-11-09 12:30:11 -05:00
Update README
This commit is contained in:
parent
c5bae74aba
commit
740cbffd2f
1 changed files with 4 additions and 0 deletions
|
@ -195,6 +195,10 @@ class DashboardPolicy < Struct.new(:user, :dashboard)
|
|||
end
|
||||
```
|
||||
|
||||
Note that the headless policy still needs to accept two arguments. The
|
||||
second argument will just be the symbol `:dashboard` in this case which
|
||||
is what is passed as the record to `authorize` below.
|
||||
|
||||
```ruby
|
||||
# In controllers
|
||||
authorize :dashboard, :show?
|
||||
|
|
Loading…
Reference in a new issue