I'm trying to hide the breadcrumbs from my layout if there are no specified breadcrumbs present.
I am using = render_breadcrumbs tag: :li, separator: '' in the application layout file, but would like to change this and only have it output if I indeed have breadcrumbs in the controller (like = render_breadcrumbs tag: :li, separator: '' if breadcrumbs_present?)
Is this possible? I am not seeing any helper methods to check whether breadcrumbs are present or if there's content_for breadcrumbs.
Hello,
I'm trying to hide the breadcrumbs from my layout if there are no specified breadcrumbs present. I am using
= render_breadcrumbs tag: :li, separator: ''
in the application layout file, but would like to change this and only have it output if I indeed have breadcrumbs in the controller (like= render_breadcrumbs tag: :li, separator: '' if breadcrumbs_present?
)Is this possible? I am not seeing any helper methods to check whether breadcrumbs are present or if there's
content_for
breadcrumbs.Thanks in advance!