Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Makes ActiveStorage controllers configurable in routes #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

elthariel
Copy link
Owner

Summary

Overriding the ActiveStorage controllers to add authentication or customize behavior is a bit tedious because it requires either:

  • using custom routes, which means losing the nice url helpers provided by active storage
  • copy pasting the routes in the application routes.rb, which is not very DRY.

I suggest allowing to configure the names of the controller in the configuration to easily subclass the controllers in your own code without losing the route helpers.

This PR is just an RFC at the moment, documentation, tests and changelog entries will be added if the overall principle is validated.

Other Information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant