<!DOCTYPE html>
<html>
    <head>
        <title>MoveRails</title>
        <%= csrf_meta_tags %>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
        <%= stylesheet_link_tag    'user-feed', media: 'all', 'data-turbolinks-track': 'reload' %>
        <%= javascript_include_tag 'user-feed', 'data-turbolinks-track': 'reload' %>
    </head>

    <body>
        <%= render "layouts/navbar-left" %>
        <%= render "layouts/toolbar" %>
        <%= yield %>
        <%= render "layouts/footer" %>
    </body>
</html>

<!DOCTYPE html>
<html>
    <head>
        <title>MoveRails</title>
        <%= csrf_meta_tags %>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
        <%= stylesheet_link_tag    'user-feed', media: 'all', 'data-turbolinks-track': 'reload' %>
        <%= javascript_include_tag 'user-feed', 'data-turbolinks-track': 'reload' %>
    </head>

    <body>
        <%= render "layouts/navbar-left" %>
        <%= render "layouts/toolbar" %>
        <% if flash.count > 0 %>
            <div class="container">
                <div class="row">
                    <div class="col s12">
                        <% flash.each do |name, msg| %>
                            <div class='alert alert-<%= "#{name}" %> alert-dismissible fade in' role="alert" id="alert_message">
                                <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                                    <span aria-hidden="true">&times;</span>
                                </button>
                                <%= content_tag :div, msg, id: "flash_#{name}" if msg.is_a?(String) %>
                            </div>
                        <% end %>
                    </div>
                </div>
            </div>
        <% end %>
        <%= yield %>
        <%= render "layouts/footer" %>
    </body>
</html>

Add flash messages to views
Add flash messages to views

