Skip to content

Commit 91beb33

Browse files
committed
Update page header title logic
1 parent 7524227 commit 91beb33

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

app/views/components/pages/header.rb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,8 @@ def initialize(title: nil, description: nil, published_on: nil, updated_on: nil)
1414
def view_template
1515
header(class: "page-header") do
1616
div(class: "container header-content") do
17-
if @title_block
18-
h1(&@title_block)
19-
else
20-
h1 { @title }
21-
end
17+
title = @title_block ? capture(&@title_block) : @title
18+
h1 { title }
2219
p(class: "description") { @description } if @description
2320
if @published_on || @updated_on
2421
span(class: "block") do

0 commit comments

Comments
 (0)