Skip to content

Instantly share code, notes, and snippets.

@bntzio
Created April 3, 2015 17:38
Show Gist options
  • Save bntzio/b2c82108e3b5b8b02357 to your computer and use it in GitHub Desktop.
Save bntzio/b2c82108e3b5b8b02357 to your computer and use it in GitHub Desktop.
/layours/application.html.erb
<!DOCTYPE html>
<html>
<head>
<title>BookmarkThis!</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
<%= csrf_meta_tags %>
</head>
<body>
<div class="container">
<ul class="nav nav-pills">
<li><%= link_to "Home", welcome_index_path %></li>
<li><%= link_to "About", welcome_about_path %></li>
<div class="pull-right user-info">
<% if current_user %>
Hello <%= current_user.name %>! <%= link_to "Sign Out", destroy_user_session_path, method: :delete %>
<% else %>
<%= link_to "Sign in with Facebook", user_omniauth_authorize_path(:facebook) %> or
<%= link_to "Register", new_user_registration_path %>
<% end %>
</div>
</ul>
<% if flash[:notice] %>
<div class="alert alert-success">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<%= flash[:notice] %>
</div>
<% elsif flash[:error] %>
<div class="alert alert-danger">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<%= flash[:error] %>
</div>
<% elsif flash[:alert] %>
<div class="alert alert-warning">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<%= flash[:alert] %>
</div>
<% end %>
<%= yield %>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment