Closed Spone closed 1 year ago
Let's work on our ViewComponent::Form::Builder to split it in smaller modules.
ViewComponent::Form::Builder
This way you can either inherit from it or include the modules you want.
We could have:
ViewComponent::Form::Helpers::Rails
ViewComponent::Form::Helpers::RailsBackports
ViewComponent::Form::Helpers::Custom
error_message
hint
ViewComponent::Form::ValidationContext
ViewComponent::Form::Lookup
ViewComponent::Form::Renderer
namespaces
render_component
component_klass
Let's work on our
ViewComponent::Form::Builder
to split it in smaller modules.This way you can either inherit from it or include the modules you want.
We could have:
ViewComponent::Form::Helpers::Rails
for the standard Rails field helpersViewComponent::Form::Helpers::RailsBackports
for the backported Rails helpersViewComponent::Form::Helpers::Custom
for our own VC::Form helpers (error_message
,hint
)ViewComponent::Form::ValidationContext
for our own validation context featureViewComponent::Form::Lookup
/ViewComponent::Form::Renderer
fornamespaces
,render_component
&component_klass