Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

Commit

Permalink
Centralizing the Flash-Message View Code
Browse files Browse the repository at this point in the history
  • Loading branch information
sdflem committed Feb 12, 2020
1 parent 0ccb580 commit 0cad1a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 6 additions & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
</head>

<body>

<% flash.each do |key, message| %>
<p><%= message %></p>
<% end %>
<%= yield %>

</body>
</html>
4 changes: 0 additions & 4 deletions app/views/static_pages/contact.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@

<h2>Feedback</h2>

<% if flash.key? :status_msg %>
<p><%= flash[:status_msg] %></p>
<% end %>
<%= form_with url: leave_feedback_path, local: true, method: :post do %>
<div>
<%= label_tag "name" %>
Expand Down

0 comments on commit 0cad1a2

Please sign in to comment.