Rails Partials For Resources -


I have exercise in my application called I currently have a partial _exercise.html .erb that I use to render them To do I have an external case where I want to present them in a very different way. Can I make one more part of the exercise that has this second format and still be able to use & lt;% = render @ exercises%>?

If not, what's the best way? Should a variable in the controller be excluded which partially asks for the layout to be used, it will have to decide both layout and one if in one file. Or is there any better way?

If you want to use commercial logic to determine when to show your For partitions of @forces collection, you should use the to_partial_path method in the exercise model to define # 4 in this post:

Or, if it There is more to the view-related decision (i.e., one view will always use regular _exersgames.arb and second view Always use _alternate_exercises.html as such. ARB) You can specify:

   

To pass items through a local iSCEN partially exercise, go to @excarriage for each item _alternate_exercises.html .erb will submit partially. .


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -