Permalink
Browse files

Improvement for the title.

  • Loading branch information...
1 parent 77cb1d9 commit f0f8064841fb3d1a171b0c600a0eefd084f5ee76 @glendel committed Mar 21, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 app/views/layouts/application.html.erb
@@ -33,7 +33,13 @@
<!--[if IE]>
<script type="text/javascript" src="<%= html5_src %>"></script>
<![endif]-->
- <title><%= ( CONFIG['app']['name'].blank? ) ? yield( :title ) : "#{CONFIG['app']['name']} | #{yield( :title )}" %></title>
+ <title>
+ <%- if ( CONFIG['app']['name'].blank? ) -%>
+ <%= ( @content_for_title.blank? ) ? 'Unknown Title' : yield( :title ) %>
+ <%- else -%>
+ <%= ( @content_for_title.blank? ) ? CONFIG['app']['name'] : "#{CONFIG['app']['name']} | #{yield( :title )}" %>
+ <%- end -%>
+ </title>
<%= csrf_meta_tag %>
<link id="themes_lnk" rel="stylesheet" type="text/css" href="<%= jquery_ui_href %>" />
<%= stylesheet_link_tag( 'application' ) %>

0 comments on commit f0f8064

Please sign in to comment.