- Pundit is what I use for Authorisations in rails
- CanCan is another alternative which I belive is more popular.
Install the Pundit Gem
- Get the latest version of the gem from rubygems
Generate the Policies
- Policies is the term Pundit uses for policy management.
- Running this command will create your first policy in
app/policies/application_policy.rb
Including in Application Controller
- Add the following line in
application_controller.rb
- See [Creating a new policy next](Creating a new Policy.md)