Skip to content

Commit

Permalink
fix examplary Post{s,}Controller, mention singularity
Browse files Browse the repository at this point in the history
  • Loading branch information
fwolfst authored and palkan committed Mar 19, 2019
1 parent 0448a7b commit 6acc37d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/quick_start.md
Expand Up @@ -24,8 +24,8 @@ The core component of Action Policy is a _policy class_. Policy class describes

We suggest having a separate policy class for each resource and encourage you to follow these conventions:
- put policies into the `app/policies` folder (when using with Rails);
- name policies using the corresponding resource name (model name) with a `Policy` suffix, e.g. `Post -> PostPolicy`;
- name rules using a predicate form of the corresponding activity (typically, a controller's action), e.g. `PostsController#update -> PostsPolicy#update?`.
- name policies using the corresponding singular resource name (model name) with a `Policy` suffix, e.g. `Post -> PostPolicy`;
- name rules using a predicate form of the corresponding activity (typically, a controller's action), e.g. `PostsController#update -> PostPolicy#update?`.

We also recommend to use an application-specific `ApplicationPolicy` with a global configuration to inherit from:

Expand Down

0 comments on commit 6acc37d

Please sign in to comment.