If what you want is to only show the @country
menu if there is no @region
menu, you can try with an elsif
:
%ul.dropdown-menu.span3
- if @region.present? && @country.present?
%li
%b
= link_to "#{t('navigation.nav.houses_all')} #{@region.name}", country_region_houses_path(@country, @region)
%li.divider
%li.nav-header Thema's
- @region.tags.find_each(:conditions => "active_house = true") do |a|
%li
#{link_to a.nav_content, tag_country_region_houses_path(@country, @region, a.name)}
- elsif @country.present?
%li
%b
= link_to "#{t('navigation.nav.houses_all')} #{@country.name}", country_houses_path(@country)
%li.divider
%li.nav-header Thema's
- @country.tags.each do |a|
%li
#{link_to a.nav_content, tag_country_houses_path(a.country, a.name).capitalize}
- else
%li
%b
= link_to "#{t('navigation.nav.houses_all')}", houses_path
%li.divider