What is the best way to render partial depending on current controller?
For example we have got this partial:<h2>Funny <em>title</em></h2>
And depending on controller i'd like to change <em> into <strong>
We can do this by passing locals to partial and use conditional:<% if :controller == "something" tag="em" elsif :controller == "other" tag="strong" %>
<h2>Funny <<%= tag %>>title</<%= tag %>></h2>
But what if there are n controllers? That number of conditions in view doesn't look good.

This is the best option. Checking the controller in the view is breaking MVC. What if you rename the controller? What if you want to use this view from another controller? Both of those would cause your logic to fail, but an instance variable won't.
–
ryeguyMar 8 '11 at 15:50