Sha256: 9d90dfc2a8c57d378200d7e2ae062080fff98230fdc490a40cde9d56216d94be
Contents?: true
Size: 452 Bytes
Versions: 1
Compression:
Stored size: 452 Bytes
Contents
Spree::FrontendHelper.class_eval do def taxon_group_tree(taxon_group, current_taxon) content_tag :div, class: 'list-group' do taxon_group.taxon_group_memberships.sort_by(&:position).map do |membership| css_class = (current_taxon.eql? membership.taxon) ? 'list-group-item active' : 'list-group-item' link_to(membership.taxon.name, seo_url(membership.taxon), class: css_class) end.join("\n").html_safe end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
spree_taxon_group-3.1.0.beta | app/helpers/spree/frontend_helper_decorator.rb |