Let’s say I have something like this in my application layout:
<title> <%= @page_title | MyPage </title>
I am wondering where is it better to set that instance variable. In the controller action, or in the view? Does it matter at all? I am asking in both performance and closest MVC way of doing it.
Rails encourages the use
content_forin your views to pass this kind of content around. Others may have a better sense of how efficient this approach is, however.