In coding up your view templates you can render a partial and pass an array of objects to be rendered once per object. OR you can use a For blank in @blank loop. How do you decide when to do which? It seems that if you use a partial for every iterable object you will end up having to modify tons of separate files to make changes to potentially one view. With the loops you can see everything right there in one file.
Generally I only use a partial for an individual object when I need to render that single object somewhere else, like in an RJS view. It keeps the views a bit easier to follow, in my opinion.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With