From 9187012e2ee37fcc2ff370a66a4e4017e5408a4d Mon Sep 17 00:00:00 2001 From: jomo Date: Sun, 21 Sep 2014 21:40:12 +0200 Subject: [PATCH] add site_headers method --- app/helpers/application_helper.rb | 5 +++++ app/views/layouts/application.html.erb | 1 + 2 files changed, 6 insertions(+) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index a9407ed..f60cc6b 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -5,6 +5,11 @@ module ApplicationHelper site_title end + def site_headers(site_headers) + content_for(:site_headers, site_headers.to_s.html_safe) + site_headers + end + def render_md(content) renderer = Redcarpet::Render::HTML.new({ filter_html: true, diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index ff5c747..a4301ad 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -9,6 +9,7 @@ <%= favicon_link_tag "favicon.ico" %> <%= javascript_include_tag "application" %> + <%= yield(:site_headers) %> <%= render partial: "/layouts/head" %>