From ee7ad7fb4660a33727922f7b0650913759a5538e Mon Sep 17 00:00:00 2001 From: hellekin Date: Fri, 22 Jan 2021 18:41:39 +0100 Subject: Remove duplicate code --- app/helpers/taxonomies_helper.rb | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/app/helpers/taxonomies_helper.rb b/app/helpers/taxonomies_helper.rb index a584177..fe46458 100644 --- a/app/helpers/taxonomies_helper.rb +++ b/app/helpers/taxonomies_helper.rb @@ -6,18 +6,4 @@ # frozen_string_literal: true module TaxonomiesHelper - def taxonomy_filter - @taxonomy ||= Taxonomy.first - html = [] - @taxonomy.categories.each do |cat| - list = [] - cat.sections.each do |sec| - list << tag.li(h("#{sec.rank}. #{sec.name}"), id: "section-#{sec.id}", data: { action: "taxonomy#section" }) - end - html << tag.li(h("#{cat.rank}. #{cat.name}") << tag.ol(list.join.html_safe), - id: "category-#{cat.id}", - data: { action: "taxonomy#category" }) - end - raw(tag.nav(tag.ol(html.join.html_safe), id: "taxonomy-#{@taxonomy.uuid}")) - end end -- cgit v1.2.3