hashrocket / decent_exposure

A helper for creating declarative interfaces in controllers
MIT License
1.81k stars 107 forks source link

Remove hide_action calls #121

Closed ekampp closed 8 years ago

ekampp commented 9 years ago

This method has been removed in Rails 5, see https://github.com/rails/rails/issues/18336

mattpolito commented 9 years ago

@ekampp Great catch on hide_action being deprecated! It looks like these hide_action calls were trying to protect the methods from the outside world. Now that they are removed in this commit that protection would be missing as well. Can you adjust to get back that intended functionality?

ekampp commented 9 years ago

What was the point of hiding actions from the implementing controller in the first place? From DHH's comment it seems that hide_action was used to hide actions from being exposed accedentally through the router, this has been fixed in a centralized manner.

So now that the methods defined in decent exposure is no longer available to the public without explicit exposure through the router, hiding them from the outside world has automatically been accomplished.

To quote him: "If it doesn’t do anything at the moment, I think it should just be removed."

mattpolito commented 9 years ago

@ekampp Thanks for your clarification. It does appear that all public methods in a controller are still exposed as actions. That is even stated in the PR. I believe to finish up this PR making those methods private would be enough. Please let me know if I am missing something that would make that unnecessary.

mattpolito commented 8 years ago

Merged

ekampp commented 8 years ago

Nice. Thanks :+1: