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

Add default_builder configuration option #1796

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

Commits on Nov 23, 2022

  1. Add default_builder configuration option

    For some CSS frameworks the current Simple Form configuration options are not enough. In particular, the error notification may require [additional nesting](https://github.com/abevoelker/simple_form_tailwind_css/blob/master/lib/simple_form/tailwind/error_notification.rb). But also data attributes on some wrappers may be [required](https://react.carbondesignsystem.com/?path=/story/components-textinput--playground&args=invalid:true). By introducing the `default_builder` configuration option any framework should be able to be configured.
    
    In the case of https://github.com/abevoelker/simple_form_tailwind_css this would allow to use
    
    ```erb
    <%= simple_form_for(@foo) do |f| %>
    ```
    
    instead of
    
    ```erb
    <%= simple_form_for(@foo, builder: SimpleForm::Tailwind::FormBuilder) do |f| %>
    ```
    gregorw committed Nov 23, 2022
    Configuration menu
    Copy the full SHA
    084c876 View commit details
    Browse the repository at this point in the history