Sha256: 9e72d59224965f20ac014de1ad72e0e5cfe6e95f386ee6a9aab3906d880d9204

Contents?: true

Size: 923 Bytes

Versions: 3

Compression:

Stored size: 923 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Plans
    # This is the engine that runs on the public interface of `decidim-plans`.
    class AdminEngine < ::Rails::Engine
      isolate_namespace Decidim::Plans::Admin

      paths["db/migrate"] = nil
      paths["lib/tasks"] = nil

      routes do
        resources :plans, only: [:index, :new, :create, :edit, :update] do
          get :search_proposals
          resources :plan_answers, only: [:edit, :update]
        end
        resources :sections, only: [:index, :new, :create, :edit, :update]

        root to: "plans#index"
      end

      initializer "decidim_plans.admin_assets" do |app|
        app.config.assets.precompile += %w(admin/decidim_plans_manifest.js
                                           decidim/plans/decidim_plans_manifest.js
                                           decidim/plans/proposal_picker.scss)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
decidim-plans-0.16.0 lib/decidim/plans/admin_engine.rb
decidim-plans-0.15.1 lib/decidim/plans/admin_engine.rb
decidim-plans-0.15.0 lib/decidim/plans/admin_engine.rb