1
0
Fork 0
mirror of https://github.com/drapergem/draper synced 2023-03-27 23:21:17 -04:00

Add documentation for denies_all

This commit is contained in:
matt swanson 2012-11-28 21:09:49 -05:00
parent 39a984f068
commit b685acf24f

View file

@ -100,6 +100,14 @@ Then, to test it:
NoMethodError: undefined method `title' for #<ArticleDecorator:0x000001020d7728>
```
You may also blacklist all methods by using `denies_all`:
```ruby
class ArticleDecorate < ApplicationDecorator
denies_all
end
```
#### Using `allows`
A better approach is to define a whitelist using `allows`: