docs/Gates.md in flipper-0.11.0 vs docs/Gates.md in flipper-0.12.0
- old
+ new
@@ -13,11 +13,11 @@
flipper[:stats].enabled? # check
```
## 2. Group
-Turn on feature based on the return value of block. Super flexible way to turn on a feature for multiple things (users, people, accounts, etc.) as long as the thing returns true when passed to the block.
+Turn on feature based on the return value of block. Super flexible way to turn on a feature for multiple things (users, people, accounts, etc.) as long as the thing returns true when passed to the block.
```ruby
# this registers a group
Flipper.register(:admins) do |actor|
actor.respond_to?(:admin?) && actor.admin?
@@ -69,11 +69,11 @@
```
if flipper[:stats].enabled?(some_admin)
# do thing...
else
- raise "Your are not authorized to view this page"
-end
+ # do not do thing
+end
```
## 3. Individual Actor
Turn feature on for individual thing. Think enable feature for someone to test or for a buddy. The only requirement for an individual actor is that it must respond to `flipper_id`.