docs/acts_as_hierarchy.md in monarchy-2.0.6 vs docs/acts_as_hierarchy.md in monarchy-2.0.7
- old
+ new
@@ -14,9 +14,13 @@
### .accessible_for
You can select all hierarchies accessible for specific user by using a scope: `accessible_for`, eg:
``` ruby
Monarchy.hierarchy_class.accessible_for(current_user) # returns [hierarchy1, hierarchy2, hierarchy5]
```
+Optionally you can pass extra allowed roles which should be inherited for this request
+``` ruby
+Monarchy.hierarchy_class.accessible_for(current_user, [:blocked, :visitors]) # returns [hierarchy1, hierarchy2, hierarchy5, hierarchy6]
+```
### .in(resource, true)
You can select all hierarchies scoped into another by using scope: `in`:
- If the second argument is `true` (`true` is by default):