You can view RSS feeds from my friends and colleagues.
A very nice and concise summary of all the lesser-known and under-appreciated benefits of using partials in Rails. There are a lot of alternatives to partials these days, but they’re so nicely integrated with models, views, and layouts, I still lean heavily towards using partials and leveraging caching to reduce performance impacts.
The only thing I’d add is that any class can work seamlessly with partials as long as it has defined a to_partial_path
method. With that, we’re not limited to rendering only ActiveRecord models with an implicitly associated partial.
I seem to have left pieces of myself scattered around the internet. This is my attempt to pull some of those pieces together.