Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Inline controller's
permitted_attributes
method
Fixes thoughtbot#417 Problem: If users include the Pundit gem on an Administrate controller, the controller attempts to call the `permitted_attributes` method defined by pundit instedad of the one defined by Administrate. Because these methods take different arguments, this results in an `ArgumentError` for the user. Solution: Inline the `permitted_attributes` method to avoid the method name collision. This narrows the public API a bit, but that's alright. The user can accomplish all of the removed functionality by overriding the parent `resource_params` method.
- Loading branch information