From 84e586ff655b76e460e8dfad81471e74fab171d8 Mon Sep 17 00:00:00 2001 From: Jeffrey Hardy Date: Tue, 20 Aug 2024 14:10:29 -0400 Subject: [PATCH] Render the assigned page title --- app/helpers/application_helper.rb | 3 +++ app/views/layouts/application.html.erb | 3 ++- app/views/sessions/new.html.erb | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index de6be7945..af79c4b80 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,2 +1,5 @@ module ApplicationHelper + def page_title_tag + tag.title @page_title || "Fizzy" + end end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 431ca11c1..f75b3e64c 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,7 +1,8 @@ - Fizzy + <%= page_title_tag %> + diff --git a/app/views/sessions/new.html.erb b/app/views/sessions/new.html.erb index 544477140..12be3dd00 100644 --- a/app/views/sessions/new.html.erb +++ b/app/views/sessions/new.html.erb @@ -1,4 +1,4 @@ -<% content_for(:title) { "Sign in" } %> +<% @page_title = "Sign in" %>
" style="--panel-size: 40ch;"> <%#= image_tag "blob.svg", class: "product__logo center colorize--black", size: 130 %> @@ -35,6 +35,6 @@ <% end %>
-<% content_for(:footer) do %> +<% content_for :footer do %>
Fizzy™ version 0
<% end %>