README.md in fume-cancan-0.0.4 vs README.md in fume-cancan-0.1.0
- old
+ new
@@ -11,18 +11,29 @@
gem 'fume-cancan'
## Usage
-Ability:
+### authorize_object
- can :manage, :admin
+~~~~ruby
+# Ability:
+can :manage, :admin
-Controller:
+# Controller:
+class Admin::BaseController < ApplicationController
+ authorize_object :admin
+end
+~~~~
- class Admin::BaseController < ApplicationController
- authorize_object :admin
- end
+### with_scope
+
+~~~~ruby
+# Controller:
+class Topics < ApplicationController
+ load_and_authorize_resource with_scope: -> (base) { base.where(online: true) }
+end
+~~~~
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)