# HG changeset patch # User Edho Arief # Date 1347223748 -25200 # Node ID a8b0775798c33245a5e323a3d5af2a933df6e278 # Parent faf30647205e598580fd5dbdc43b6d8545c58910 Added title. diff -r faf30647205e -r a8b0775798c3 app/helpers/application_helper.rb --- a/app/helpers/application_helper.rb Mon Sep 10 03:48:01 2012 +0700 +++ b/app/helpers/application_helper.rb Mon Sep 10 03:49:08 2012 +0700 @@ -1,2 +1,10 @@ module ApplicationHelper + def html_title + base_title = 'Zeropaste' + if content_for? :title + "#{content_for(:title)} | #{h base_title}".html_safe + else + base_title + end + end end diff -r faf30647205e -r a8b0775798c3 app/views/layouts/application.html.erb --- a/app/views/layouts/application.html.erb Mon Sep 10 03:48:01 2012 +0700 +++ b/app/views/layouts/application.html.erb Mon Sep 10 03:49:08 2012 +0700 @@ -1,7 +1,7 @@ - Zeropaste + <%= html_title %> <%= stylesheet_link_tag "application", :media => "all" %> <%= javascript_include_tag "application" %> <%= csrf_meta_tags %> diff -r faf30647205e -r a8b0775798c3 app/views/pastes/new.html.erb --- a/app/views/pastes/new.html.erb Mon Sep 10 03:48:01 2012 +0700 +++ b/app/views/pastes/new.html.erb Mon Sep 10 03:49:08 2012 +0700 @@ -1,3 +1,4 @@ +<% provide :title, 'New Paste' %>

New Paste

<%= render 'form' %>