CanCanCan
Add https://github.com/CanCanCommunity/cancancan
Used 112 times
D
Dale Zak
Usage
Run this command in your Rails app directory in the terminal:
rails app:template LOCATION="https://railsbytes.com/script/V33sj3"
Template Source
Review the code before running this template on your machine.
def do_bundle
# Custom bundle command ensures dependencies are correctly installed
Bundler.with_unbundled_env { run "bundle install" }
end
run 'bundle add cancancan'
do_bundle
rails_command 'generate cancan:ability'