Pundit
Pundit provides a set of helpers which guide you in leveraging regular Ruby classes and object oriented design patterns to build a simple, robust and scalable authorization system.
Used 235 times
Usage
Pundit is an authorization library that allows you to use pure object oriented classes for policies.
Checkout the GitHub for more information: https://github.com/varvet/pundit
Checkout the GitHub for more information: https://github.com/varvet/pundit
Run this command in your Rails app directory in the terminal:
rails app:template LOCATION="https://railsbytes.com/script/X6ks6o"
Template Source
Review the code before running this template on your machine.
run 'bundle add pundit'
puts "Adding Pundit module to Application"
puts ""
inject_into_file 'app/controllers/application_controller.rb', after: "class ApplicationController < ActionController::Base\n" do
" include Pundit\n"
end
puts "Running Pundit Generator"
rails_command("generate pundit:install")