2
votes

I currently found simple_form gem for rails application. I currently join the rails project and added this to existing project. After installation it creates form for new migrations with simple_form. I want to migrate all existing forms to use simple_form.

How can I accomplish existing non simple_form layout forms to use simple_form layout.

Is there any way to generate forms using console or script to make simple_form layout?

1
I think that simple_form_for still has access to the same methods as form_for. Try replacing a form_for in your app with a simple_form_for. If it still works, it means that simple_form_for can either use its own DSL (methods, options, etc) OR use the good old syntax of form_for (which would mean no need for extra coding for you!)MrYoshiji

1 Answers

1
votes

Unfortunately, I don't believe there is a generator that can translate all your other forms in to the simple_form layout for you.

If the forms you have now currently work, I would say there is no need to change them. The point of the gem is to make it easier to create new forms. Use simple_form going forward and leave the ones that work. In the future if any form breaks, rewrite it in the simple_form DSL.