Sha256: 86ae99f64733e86bb2e4a568541740ebc8e521f90556fe8f2ed84fa07e6eeb27

Contents?: true

Size: 535 Bytes

Versions: 9

Compression:

Stored size: 535 Bytes

Contents

module Georgia
  module MenusHelper

    def render_menu menu
      return unless menu and menu.is_a? Georgia::Menu
      links = menu.links.ordered.decorate
      if links.map(&:dropdown).include? true
        render 'menus/dropdown_menu', menu: menu, links: links
      else
        render 'menus/menu', menu: menu, links: links
      end
    end

    def render_links menu
      return unless menu and menu.is_a? Georgia::Menu
      render partial: 'menus/link', collection: menu.links.ordered.decorate, as: :link
    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
georgia-0.7.8 app/helpers/georgia/menus_helper.rb
georgia-0.7.7 app/helpers/georgia/menus_helper.rb
georgia-0.7.6 app/helpers/georgia/menus_helper.rb
georgia-0.7.5 app/helpers/georgia/menus_helper.rb
georgia-0.7.4 app/helpers/georgia/menus_helper.rb
georgia-0.7.3 app/helpers/georgia/menus_helper.rb
georgia-0.7.2 app/helpers/georgia/menus_helper.rb
georgia-0.7.1 app/helpers/georgia/menus_helper.rb
georgia-0.7.0 app/helpers/georgia/menus_helper.rb