elabs/pundit — pull request #91 by ryakh (2014-01-09 18:26:44+00:00)
Title: Updated README to cover mass-assignment protection for the create method

If we call `permitted_attributes` method during `create` action an error will be risen since (in the context of example provided in README), `@post` instance variable is `nil`; since average `create` method looks something like this:

```ruby
def create
@post = Post.create(permitted_attributes)
end
```

To fix this without interfering with the pundit code, it will be enough to provide a valid non `nil` object to the policy method (so the correct policy could be loaded).