Class: RailsAppGenerator::AddOns::Pundit

Inherits:
RailsAppGenerator::Addon show all
Defined in:
lib/rails_app_generator/addons/pundit.rb

Overview

Add 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.

Instance Attribute Summary

Attributes inherited from RailsAppGenerator::Addon

#context, #dependencies, #gem_entries

Instance Method Summary collapse

Methods inherited from RailsAppGenerator::Addon

addon_name, dependencies, depends_on, gem, gem_entries, #initialize, required_gem, reset_gem_entries

Constructor Details

This class inherits a constructor from RailsAppGenerator::Addon

Instance Method Details

#applyObject



10
11
12
13
# File 'lib/rails_app_generator/addons/pundit.rb', line 10

def apply
  directory 'app/policies', 'app/policies'
  template 'app/controllers/authorized_controller.rb.erb', 'app/controllers/authorized_controller.rb'
end