Sha256: b323d0827664490558441236766597ea49a52d3b58376f7d51c2aa7e4b34865a

Contents?: true

Size: 730 Bytes

Versions: 1

Compression:

Stored size: 730 Bytes

Contents

HappySeed Roles Install
===================

### What does this do?

The `happy_seed:roles` generator

* Installs cancancan
* Created an enum on the User model ( :user and :admin )
* Creates a basic `abilities.rb` file
* Adds a generic `access_denied` method on `application_controller`

### Why do you want this?

This is a basic framework for role-based permissions.  The admin generator will optionally use this if you don't install a seperate AdminUser class.

### Environment Variables

na

### What needs to be done?

Define roles in the enum on the user model and abilities inside of the `abilities.rb` class per the directions in the cancan documentation [here.](https://github.com/ryanb/cancan/wiki/Defining-Abilities)  

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
happy_seed-0.0.21 lib/generators/happy_seed/roles/templates/docs/README.03.roles.rdoc