Sha256: 9fc80f885812ac833b83135dc17272f6e062370884bac09f351e43f4b4e44990
Contents?: true
Size: 662 Bytes
Versions: 13
Compression:
Stored size: 662 Bytes
Contents
# frozen_string_literal: true module Decidim module Design class ApplicationController < ::DecidimController include NeedsOrganization helper Decidim::MetaTagsHelper helper_method :path_items def path_items(path) files = Dir.glob("#{gem_path}/app/views/decidim/design/#{path}/*.html.erb") files.map do |file| name = File.basename(file, ".html.erb") { name:, path: send("#{path.singularize}_path", name) } end end private def gem_path @gem_path ||= Bundler.load.specs.find { |spec| spec.name == "decidim-design" }.full_gem_path end end end end
Version data entries
13 entries across 13 versions & 1 rubygems