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

[Idea, PR offer] Inheriting from ApplicationController can cause issues, consider configurable base controller? #449

Closed
dhnaranjo opened this issue Oct 13, 2023 · 1 comment

Comments

@dhnaranjo
Copy link

Yowhattup? My ApplicationController sets a default FormBuilder that is customized to my liking. This includes changing the arity of FormBuilder#label, which is probably a bad idea but here we are. Since Blazer::BaseController inherits from ApplicationController I hit an ArgumentError when on the New or Edit query page.

My workaround is to reopen Blazer::BaseController and set the default form builder ActionView::Helpers::FormBuilder. I don't feel good about that. I would prefer to have a Blazer configuration that allows me to set an alternate parent for Blazer::BaseControIller.

Thoughts? If you're into it I'll submit a PR some time.

@ankane ankane closed this as completed in d682e41 Nov 27, 2023
@ankane
Copy link
Owner

ankane commented Nov 27, 2023

Hi @dhnaranjo, thanks for the suggestion. This isn't something I'd like to make configurable right now, but pushed a fix for the specific issue with default_form_builder in the commit above.

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

No branches or pull requests

2 participants