Sha256: 5579c42db30f3441bd7a7c9a85c12be9185fb9bfb3cee574571979debb4842a1

Contents?: true

Size: 1010 Bytes

Versions: 1

Compression:

Stored size: 1010 Bytes

Contents

module HomePageMusic
  module Navigation
    def self.menu_code(resource)
      case resource
      when :music
        Proc.new do |primary, options|
          primary.item :music, I18n.t('music.index.title'), music_path do |music|
            music.item :year_in_reviews, I18n.t('music_year_in_reviews.index.title'), music_year_in_reviews_path do |year_in_reviews|
              if @year_in_review.present?
                year_in_reviews.item :show, @year_in_review['year'], music_year_in_review_path(@year_in_review['year']) do |year_in_review|
                  year_in_review.item :top_albums, I18n.t('music_year_in_reviews.show.top_albums.short_title'), top_albums_music_year_in_review_path(@year_in_review['year'])  
                  year_in_review.item :top_songs, I18n.t('music_year_in_reviews.show.top_songs.short_title'), top_songs_music_year_in_review_path(@year_in_review['year'])  
                end
              end
            end
          end
        end
      end
    end
  end
end
    

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
home_page_music-0.0.1 lib/home_page_music/navigation.rb