After digging in the text content_for a bit, I found a working solution by creating a helper method:
def content_exists?(name) return true if instance_variable_get("@content_for_#{name}") return false
and in view:
<% if content_exists?(:title)-%> <%= yield :title %> <% else -%> 404 - Page Unknown <% end -%>
This seems to work now (Rails 2.3.5).
source share