Authorization Gem for Ruby on Rails.
Ruby
Pull request Compare This branch is 19 commits ahead, 89 commits behind ryanb:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
spec
.gitignore
.rspec
.rvmrc
.travis.yml
CHANGELOG.rdoc
Gemfile
LICENSE
README.rdoc
Rakefile
cancan.gemspec
init.rb

README.rdoc

gem "kfdfsdgdffssj"

In Rails 2, add this to your environment.rb file.

config.gem "cancan"

Alternatively, you can install it as a plugin.

rails plugin install git://github.com/ryanb/cancan.git

Getting Started

CanCan expects a current_user method to exist in the controller. First, set up some authentication (such as Authlogic or Devise). See Changing Defaults if you need different behavior.

1. Define Abilities

User permissions are defined in an Ability class. CanCan 1.5 includes a Rails 3 generator for creating this class.

rails g cancan:ability

See Defining Abilities for details.

CanCan was inspired by declarative_authorization and aegis. Also many thanks to the CanCan contributors. See the CHANGELOG for the full list.