I
I
IvanN7772017-04-19 20:46:48
Ruby on Rails
IvanN777, 2017-04-19 20:46:48

Trailblazer gem How to use if the form consists of more than one model?

If anyone has come across a little I don’t understand
1) What if I transfer data to a form or to any other cell not from one model, but several rings or models
2) If I just need an output without creating it and it is from several models
How do you feel about trailblaizer?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
ksim_miloff, 2017-04-20
@IvanN777

1.1 To work with forms, trailblaizer has a reform that, through Composition , allows you to describe a form object for several models at once. This form object can then be fed to the rail formbuilder.
1.2 What is the problem with passing more than one model to cell?
or even like this:
In the first case, the data will be accessed through options, in the second through model.
2 This doesn't look like a question.
3 Trailblazer is not a bad thing, but it’s too big and magical for my taste, I don’t like how the components penetrate each other :), I prefer to take it partially, for example, only reform and cells, and instead of operations, take the interactors gem. In addition, the trailblaizer developer himself does not like rails very much, he was repeatedly convinced of this by reading his answers on github when rails programmers have problems.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question