Pregunta

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

Or is the if condition useless here?

¿Fue útil?

Solución

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top