0
<%= yield(:title_box) if content_for?(:title_box) %>

Or is the if condition useless here?

Mark Huk
  • 2,379
  • 21
  • 28
user1049097
  • 1,901
  • 4
  • 22
  • 35

1 Answers1

2

The condition check is not needed as if nothing to render there is nothing will be outputted. See docs

Mark Huk
  • 2,379
  • 21
  • 28