Accessing title property adds an empty title tag #15

Open
opened 2026-01-23 08:16:42 -05:00 by katie · 1 comment
Collaborator

When @post is not a Blog::Post,

if @post.title.instance_of? String
    title do @post.title end
else
    title do "kat5.dev" end
end

emits

<title></title>
<title>kat5.dev</title>
When `@post` is not a `Blog::Post`, ```ruby if @post.title.instance_of? String title do @post.title end else title do "kat5.dev" end end ``` emits ```html <title></title> <title>kat5.dev</title> ```
Owner

I'm gonna make this an error:

Puma caught this error: private method 'title' called for nil (NoMethodError)
I'm gonna make this an error: ``` Puma caught this error: private method 'title' called for nil (NoMethodError) ```
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nick/flora#15
No description provided.