This is an addition to #3900
In addition to using attr_accessible to identify which params to wrap, this also allows you to specify a role using an :as option on wrap_parameters. Then the wrapped params will only be those accessible to that role.
Thanks, but this won't work properly know because in the case the user doesn't pass :as, it will be set to nil and it won't work as expected:
The default for :as needs to be :default.
Is this still an issue?
Is it worth keeping the issue open for rails?
Yes, this needs to be fixed. Could you please rebase your pull request, then push --force it to the same branch and ping me again? Thanks.
@josevalim -- would be happy to, but I don't understand how you want me to rebase it. I never use rebasing and don't want to screw it up. Could you clarify?
Rebasing: git rebase <branch-name>
git rebase <branch-name>
Add a role option to wrap_parameters.
The role option identifies which parameters are accessible and should be wrapped. The default role is :default.
@josevalim -- rebased. Thanks!