2 ms·
I really wanted to avoid going in a discussion between gems trying to replace FormBuilder but I feel there needs to be some clarification. I have used simple_f
by pothibo 13y ago
I really wanted to avoid going in a discussion between gems trying to replace FormBuilder but I feel there needs to be some clarification.
I have used simple_form, and I have used many different gems in the past. Simply saying that using simple_form solves every issues completely misses the point.
There's a lot of forms out there that are built dynamically that needs a lot of conditions and evaluations to build the gems. CSS class can be added/removed depending on the current status of the user. This kind of things CANNOT be easily done with simple_form.
For example, what if I need to add a class to the form if the user is an admin? Would you create a helper method for that? Or a ternary condition?
If I mentioned simple_form in the very beginning of the article, it's possible that I did it so I would avoid this kind of facile counter-argument. I guess I was wrong.
- midas007 13y agoIt's a toolbox, each gem has unique strengths and weaknesses. If using ActiveAdmin, it's likely that large projects that include external apps already require simpleform and/or formtastic in addition to form_for/formbuilder. Whatever works best for a given situation / is easiest / most maintainable gets my vote.