Take the 2-minute tour ×

Something like this in application.rb:

# Configure application generators
config.app_generators do |g|
  g.form_builder Formtastic::SemanticFormBuilder

If I do so I get an error when I try to scaffold a model:

Expected Thor class, got Formtastic::SemanticFormBuilder 

Is it possible to set Formtastic as default form builder?


I have tried Simple forms and it's really awesome (Thanks to nathanvda). The DSL is almost the same as Formtastic has. The only important difference for me is in customizing button labels. In formtastic it's possible to use resource file (formtastic.yml) to set different labels for the same model and action. Sometimes it's necessary, for example in Devise views. But it costs nothing to switch from formtastic to simple forms even in this case as it's possible to do it in this pretty simple way:

= f.submit t("customized_button_label")

Now about the original question. When I installed simple forms it creates template in lib/templates/haml/scaffold directory which will be used with scaffold. Straightforward.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

I am not entirely sure about formtastic, either it does this straight out of the box, so not configuration needed; or not at all.

But what i do know: simple_form does provide scaffolding, even configurable which is totally awesome. The DSL between formtastic and simple_form is close to identical, but with simple_form the level of configuration is much better. You have total control how a form should be scaffolded, you have total control how a single field is turned into html. Pretty awesome.

You can find a quick introduction here.

share|improve this answer
Thanks for pointing me! For some reason I have missed this Ryan's screencast. –  Voldy Dec 8 '10 at 9:40

Your Answer


