I'd suggest you use content blocks
.
Within your layout file, such as layout/application.haml, place this code where you want the subnav to be rendered:
= content_for :subnav
..and within your view file (jobs/index.haml)
- content_for :subnav
= render partial: 'layouts/subnav'
Couple of alternatives:
- Check controller#action in layout file and only show for jobs#index
- Add a simple @show_sub_nav instance variable and set to true within your controller. In your layout file:
= render partial: 'layouts/subnav' if @show_sub_nav
You can see how to achieve (2) with my answer here.