Permalink
Browse files

Merge pull request #103 from ognevsky/master

Nifty:layout application.html.haml fixed
  • Loading branch information...
2 parents e29cae6 + f3818da commit 18dfe4847073dad9b73f215c402d971e7b49c19e @ryanb committed Jun 30, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/generators/nifty/layout/templates/layout.html.haml
@@ -3,7 +3,7 @@
%head
%title
- = yield(:title) || "Untitled"
+ = content_for?(:title) ? yield(:title) : "Untitled"
%meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}/
= stylesheet_link_tag "<%= file_name %>"
= javascript_include_tag :defaults

2 comments on commit 18dfe48

Why content_for? is better?

= yield(:title).presence || "Untitled"

from commit c3eeaeb seems also OK.

@avakhov I want to ask the same question

Please sign in to comment.