3
1) Structure of views
Assuming I have two sets of views, the set A and the set B.
Both sets are similar possessing the view index.html.erb and the partials _index.html.erb, _new.html.erb, _edit.html.erb, _table.html.erb, _show.html.erb, _bean.html.erb, _form.html.erb and _field.html.erb.
2) Relation between views
Both also have a similar format where the view index.html.erb render the partial _index.html.erb;
A partial _index.html.erb render the partials _new.html.erb, _edit.html.erb, _table.html.erb, _show.html.erb;
Both the partial _edit.html.erb as to _new.html.erb render a partial _form.html.erb;
A partial _form.html.erb redempt the partial _fiels.html.erb;
And the partials _show.html.erb and _table.html.erb rederizam a partial _bean.html.erb.
3) Relationship between the two view groups
But in my logic, object A has a one-to-many relationship to object B, and view a/index also render the partial b/_index.
4)Problem
By implementing the following code render partial: 'b/index' in a/index.html.erb the contents of the file b/_index.html.erb is inserted correctly, but the same renders the folder partitals a and no longer those of b. Example: is rendered a/_show.html.erb instead of b/_show.html.erb.
5) Doubt
However it has how I determine the partial to be rendered, based on the partial directory that referenced it in place of the current view directory?
It has to display the directory structure to be clearer?
– Luiz Carvalho