Skip to content
Browse files

fix readme

  • Loading branch information...
1 parent 4a9fdd2 commit 26c33d18008b4e8427b6a7a09aaddbd14907f83a @dnagir committed Jan 7, 2012
Showing with 6 additions and 5 deletions.
  1. +6 −5 README.md
View
11 README.md
@@ -88,11 +88,10 @@ end
If you want to change the context in Rails then just override it on a single controller or globally on the `ApplicationController`:
```ruby
-class DefaultAccess
- include Allowy::AccessControl
- # This will give you methods without the need to go to context object
- delegate :current_user, :to => :context
- delegate :current_company, :to => :context
+class PagesController < ApplicationController
+ def allowy_context
+ {realy: 'anything, can_be: 'here', event: params}
+ end
end
```
@@ -104,6 +103,8 @@ I recommend creating your own base class to provide common context and maybe som
```ruby
class DefaultAccess
include Allowy::AccessControl
+ delegate :current_user, :to => :context
+ delegate :current_company, :to => :context
end
```

0 comments on commit 26c33d1

Please sign in to comment.
Something went wrong with that request. Please try again.