test/dummy/app/views/layouts/application.html.erb in bigmouth-0.0.1 vs test/dummy/app/views/layouts/application.html.erb in bigmouth-0.0.2
- old
+ new
@@ -5,18 +5,19 @@
<%= stylesheet_link_tag "application" %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
</head>
<body>
-
- <div>
- <p id="notice"><%= flash[:notice] %></p>
- <p id="alert"><%= flash[:alert] %></p>
- </div>
- <div>
- Current User is: <%= current_user ? current_user[Bigmouth.username_key.to_sym] : "Guest" %>
- </div>
-
- <%= yield %>
-
+ <div>
+ <% if flash[:notice] %>
+ <p id="notice"><%= flash[:notice] %></p>
+ <% end %>
+ <% if flash[:alert] %>
+ <p id="alert"><%= flash[:alert] %></p>
+ <% end %>
+ </div>
+ <div>
+ Current User is: <%= current_user ? current_user[Bigmouth.config.username_key.to_sym] : "Guest" %>
+ </div>
+ <%= yield %>
</body>
</html>