I'm trying to decide how much to reuse partials in Rails. I've seen reuse encouraged here: Best Practices for using partials in Rails
But the more you reuse, the more you add if-then logic.
For example, I could use the same partial: - for the "show" action (showing a single model) - for the "index" action (showing a collection of models) - for the "form" action - for the "show" action of an associated model
My rule of thumb here is if-then is okay in moderation, and without any nested if-thens...but I'm curious if there are any best practices here, as I haven't seen it discussed much.
EDIT: To clarify, I'm talking about if/then based on parameters like "is_editable" or "show_author"...not based on calling action like "for_show" or "for_form".