Last active
August 29, 2015 14:14
-
-
Save abitdodgy/0be428b40d9259f5a655 to your computer and use it in GitHub Desktop.
An application.html.erb layout file for Rails 4 to use with Sublime Text's Insert Gist feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% flash.each do |key, message| %> | |
<%= content_tag :div, class: "alert alert-full-page alert-#{key} alert-dismissable", role: "alert" do %> | |
<button type="button" class="close" data-dismiss="alert" aria-label="Close"> | |
<span aria-hidden="true">×</span> | |
</button> | |
<%= message %> | |
<% end %> | |
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title> | |
<%= page_title yield(:title) %> | |
</title> | |
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %> | |
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %> | |
<%= csrf_meta_tags %> | |
</head> | |
<body> | |
<%= render 'flash' %> | |
<main class="page-wrapper"> | |
<div class="centered-page"> | |
<%= yield %> | |
</div> | |
</main> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ApplicationHelper | |
def page_title(title) | |
base_title = "Carrefour" | |
if title.blank? | |
base_title | |
else | |
"#{base_title} - #{title}" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment