Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Generator allowing for a custom form framework (E.g. Formtastic)

#6082

Hi,

In the spirit of making Rails more modular I am considering creating a patch enabling developers to invoke a custom form generator during scaffold generation, such as choosing Formtastic or Simple Form instead of the Rails default. The API would be something like this:

config.generators do |g|

g.form_framework :formtastic

end

Already the Formtastic gem includes a generator which can be called from the command line so this would be the first non default entry optionally invoked by the generator.

Do others here consider this feature worthwhile, something worth taking the effort to patch? A show of hands (or +1s) would be greatly appreciated. Better yet would be volunteers willing to work alongside me making this patch happen.

Jack

Reported by Jack Kinsella · November 29th, 2010 @ 10:56 AM

State: invalid
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. José Valim
    José Valim
    • State changed from new to invalid
    • Importance changed from to Low

    Rails already supports this and simple_form makes use of this feature. It just copies a file at lib/templates/erb/scaffold/_form.html.erb and generator will pick it up. This is a great solution because it even allows you to customize it for application specific logic.

    In simple form, you just need to do: rails g simple_form:install

    November 29th, 2010 @ 11:28 AM