1
0
Fork 0
mirror of https://github.com/varvet/pundit.git synced 2022-11-09 12:30:11 -05:00

Update README

This commit is contained in:
Linus Marton 2019-01-18 10:40:04 +01:00
parent c5bae74aba
commit 740cbffd2f
No known key found for this signature in database
GPG key ID: 3AE26AD3E41F5ED8

View file

@ -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?