mirror of
https://github.com/varvet/pundit.git
synced 2022-11-09 12:30:11 -05:00
commit
f6455c4100
1 changed files with 1 additions and 1 deletions
|
@ -98,7 +98,7 @@ and the given record. It then infers from the action name, that it should call
|
||||||
raise "not authorized" unless PostPolicy.new(current_user, @post).create?
|
raise "not authorized" unless PostPolicy.new(current_user, @post).create?
|
||||||
```
|
```
|
||||||
|
|
||||||
You can pass a second arguent to `authorize` if the name of the permission you
|
You can pass a second argument to `authorize` if the name of the permission you
|
||||||
want to check doesn't match the action name. For example:
|
want to check doesn't match the action name. For example:
|
||||||
|
|
||||||
``` ruby
|
``` ruby
|
||||||
|
|
Loading…
Add table
Reference in a new issue