josevalim/inherited_resources — pull request #260 by taavo (2013-02-27 03:52:30+00:00)
Title: Integrate with strong_parameters

See also #326

We now check for a method `permitted_params` in `build_resource_params`, and use it instead of `params` if present. We're expecting `permitted_params` to be implemented using strong_parameters' `permit` method, like this:

```
def permitted_params
params.permit(:widget => [:permitted_field, :other_permitted_field])
end
```

Note that this doesn't work if you use strong_parameters' `require` method, because whereas the above example returns a cleaned copy of `params`, `params.require(:widget).permit(:permitted_field, :other_permitted_field)` returns a cleaned copy of `params[:widget]`.