Sha256: 9ceee0c61efe982c47d902948f7d97d159d6e85dce8e14572afabb0157a30706

Contents?: true

Size: 1.18 KB

Versions: 7

Compression:

Stored size: 1.18 KB

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]
          resources :tags, except: [:show]
          member do
            get :taggings
            patch :update_taggings
            post :close
            post :reopen
          end
          collection do
            resource :budgets_export, only: [:new, :create]
          end
        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

7 entries across 7 versions & 1 rubygems

Version Path
decidim-plans-0.18.2 lib/decidim/plans/admin_engine.rb
decidim-plans-0.18.1 lib/decidim/plans/admin_engine.rb
decidim-plans-0.18.0 lib/decidim/plans/admin_engine.rb
decidim-plans-0.17.0 lib/decidim/plans/admin_engine.rb
decidim-plans-0.16.9 lib/decidim/plans/admin_engine.rb
decidim-plans-0.16.8 lib/decidim/plans/admin_engine.rb
decidim-plans-0.16.7 lib/decidim/plans/admin_engine.rb