Sha256: f54b596a158d87fbbdb2a05e37bc086ae9fd95e4326383f907bed790011c9034

Contents?: true

Size: 484 Bytes

Versions: 13

Compression:

Stored size: 484 Bytes

Contents

# frozen_string_literal: true

require "active_support/concern"

module Decidim
  module Design
    # Common logic of design controllers
    module HasTemplates
      extend ActiveSupport::Concern

      included do
        def show
          raise ActionController::RoutingError, "Not Found" unless lookup_context.exists?("decidim/design/#{controller_name}/#{params[:id]}")

          render "decidim/design/#{controller_name}/#{params[:id]}"
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
decidim-design-0.29.1 app/controllers/concerns/decidim/design/has_templates.rb
decidim-design-0.28.4 app/controllers/concerns/decidim/design/has_templates.rb
decidim-design-0.29.0 app/controllers/concerns/decidim/design/has_templates.rb
decidim-design-0.28.3 app/controllers/concerns/decidim/design/has_templates.rb
decidim-design-0.29.0.rc4 app/controllers/concerns/decidim/design/has_templates.rb
decidim-design-0.29.0.rc3 app/controllers/concerns/decidim/design/has_templates.rb
decidim-design-0.29.0.rc2 app/controllers/concerns/decidim/design/has_templates.rb
decidim-design-0.29.0.rc1 app/controllers/concerns/decidim/design/has_templates.rb
decidim-design-0.28.2 app/controllers/concerns/decidim/design/has_templates.rb
decidim-design-0.28.1 app/controllers/concerns/decidim/design/has_templates.rb
decidim-design-0.28.0 app/controllers/concerns/decidim/design/has_templates.rb
decidim-design-0.28.0.rc5 app/controllers/concerns/decidim/design/has_templates.rb
decidim-design-0.28.0.rc4 app/controllers/concerns/decidim/design/has_templates.rb