<!DOCTYPE html>
<html ng-app="Survey">
<head>
  <title>Rails Survey</title>
  <%= stylesheet_link_tag    "application", media: "all" %>
  <%= csrf_meta_tags %>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="description" content="">
  <meta name="author" content="">
  <meta charset="utf-8">
</head>

  <%= render 'layouts/header' %>
  
  <div class="content container">
    <div class="row">
      <% flash.each do |key, msg| %>
        <div class="alert alert-<%= key == :alert ? "danger" : "success" %> text-center"><%= msg %></div>
      <% end %>
    </div>
    <div class="row">
      <%= yield %>
    </div>
  </div>

  <%= render 'layouts/footer' %>

  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.4/angular.js"></script>
  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.4/angular-resource.js"></script>
  <%= javascript_include_tag "application" %>

<!DOCTYPE html>
<html ng-app="Survey">
<head>
  <title>Rails Survey</title>
  <%= stylesheet_link_tag    "application", media: "all" %>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.4/angular.js"></script>
  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.4/angular-resource.js"></script>
  <%= javascript_include_tag "application" %>
  <%= csrf_meta_tags %>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="description" content="">
  <meta name="author" content="">
  <meta charset="utf-8">
</head>

  <%= render 'layouts/header' %>
  
  <div class="content container">
    <div class="row">
      <% flash.each do |key, msg| %>
        <div class="alert alert-<%= key == :alert ? "danger" : "success" %> text-center"><%= msg %></div>
      <% end %>
    </div>
    <div class="row">
      <%= yield %>
    </div>
  </div>

  <%= render 'layouts/footer' %>

Move js to top so real time stats will work
Move js to top so real time stats will work
