Open
Description
I have some custom behavior which applies to all forms in my app. I can either follow https://github.com/plataformatec/simple_form#custom-form-builder (and replace all simple_form_for
-calls) or monkeypatch SimpleForm::FormBuilder
, but I was thinking if it might make sense to make a custom form_builder configurable. This would allow users to define something like a ApplicationFormBuilder
(analogous to ApplicationRecord
etc.) which has app-specific behavior. Configuration would simply be:
SimpleForm.setup do |config|
config.form_builder = "ApplicationFormBuilder"
end
I'd be willing to put a PR together, but I first wanted to get a sense if this would be considered a useful addition?
Activity