couple fixes in readme
This commit is contained in:
parent
28eaf1bc99
commit
9d58226563
11
README.rdoc
11
README.rdoc
|
@ -13,7 +13,7 @@ You can set it up as a gem in your environment.rb file.
|
||||||
|
|
||||||
And then install the gem.
|
And then install the gem.
|
||||||
|
|
||||||
gem install cancan
|
sudo rake gems:install
|
||||||
|
|
||||||
Alternatively you can install it as a Rails plugin.
|
Alternatively you can install it as a Rails plugin.
|
||||||
|
|
||||||
|
@ -157,8 +157,8 @@ There is no limit to what actions you can use to determine abilities. For exampl
|
||||||
|
|
||||||
CanCan makes two assumptions about your application.
|
CanCan makes two assumptions about your application.
|
||||||
|
|
||||||
* The permissions are defined in Ability#prepare.
|
* The permissions are defined in Ability#prepare.
|
||||||
* The user is fetched with current_user method in the controller.
|
* The user is fetched with current_user method in the controller.
|
||||||
|
|
||||||
You can override these by defining the "current_ability" method in your ApplicationController.
|
You can override these by defining the "current_ability" method in your ApplicationController.
|
||||||
|
|
||||||
|
@ -191,3 +191,8 @@ For example, let's assume that each user has_many :permissions, and each permiss
|
||||||
end
|
end
|
||||||
|
|
||||||
The actual details will depend largely on your application requirements, but hopefully you can see how it's possible to define permissions in the database and use them with CanCan.
|
The actual details will depend largely on your application requirements, but hopefully you can see how it's possible to define permissions in the database and use them with CanCan.
|
||||||
|
|
||||||
|
|
||||||
|
== Special Thanks
|
||||||
|
|
||||||
|
CanCan was inspired by declarative_authorization[http://github.com/stffn/declarative_authorization/] and aegis[http://github.com/makandra/aegis]. Many thanks to the authors and contributors.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user