How to set the page title in some views and use the default title if it is not set?
I am using HAML. What is the right way to do this?
Now I like:
- content_for :title, "Title for specific page"
and in the layout:
%title= h yield(:title)
But how to set this header, but if it does not exist, set the default value?
source
share