Sha256: 990e24ca7482241dee3fd512a64071c76ea657996a293dafbfe2b2c3f384d8d8
Contents?: true
Size: 553 Bytes
Versions: 18
Compression:
Stored size: 553 Bytes
Contents
class TaxonomiesFrontEndController < FrontEndController before_action :load_taxonomy, only: :show hooks_for :taxonomy, only: :show def show render *@taxonomy.template_args end private def load_taxonomy @taxonomy = taxonomy_class.find_by_path(permalink_path) if @taxonomy instance_variable_set "@#{ @taxonomy.type.underscore }", @taxonomy else raise_404 end end def taxonomy_class PushType::Taxonomy.descendants(exposed: true).find { |t| t.base_slug == params[:taxonomy] } or raise_404 end end
Version data entries
18 entries across 18 versions & 1 rubygems