Skip to content

Instantly share code, notes, and snippets.

@andrebras
Created January 26, 2012 18:55
Show Gist options
  • Save andrebras/1684362 to your computer and use it in GitHub Desktop.
Save andrebras/1684362 to your computer and use it in GitHub Desktop.
So you can compare....
<!DOCTYPE html>
<html>
<head>
<title><%= content_for?(:title) ? yield(:title) : "Sprai" %></title>
<%= stylesheet_link_tag "style", media: 'screen, projection' %>
<%= stylesheet_link_tag "print", media: 'print' %>
<%= stylesheet_link_tag "application" %>
<%= javascript_include_tag :defaults %>
<%= csrf_meta_tag %>
<%= yield(:head) %>
</head>
<body>
<div class="topbar">
<div class="topbar-inner">
<div class="container">
<h3 class="brand">sprai</h3>
<ul class="nav">
<li><%= link_to "Dashboard", dashboard_index_path %></li>
<li><%= link_to Project.model_name.human(:count => 0), projects_path %></li>
<li><%= link_to ComercialEntity.model_name.human.pluralize, entities_comercial_entities_path %></li>
</ul>
<%= form_tag entities_comercial_entities_path, method: 'get' do %>
<p>
<%= search_field_tag :search, params[:search] %>
<%= submit_tag "Pesquisa", name: nil %>
</p>
<% end %>
</div>
</div>
</div>
<div id="container">
<% flash.each do |name, msg| %>
<%= content_tag :div, msg, :id => "flash_#{name}" %>
<% end %>
<%= content_tag :h1, yield(:title) if show_title? %>
<%= yield %>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment