Sha256: c052239d69e95d7231fe613d3121235d5ee57204428dfa3416bb8ae4fbe9aa18

Contents?: true

Size: 1.09 KB

Versions: 13

Compression:

Stored size: 1.09 KB

Contents

# frozen_string_literal: true

module Decidim
  module Budgets
    # This is the engine that runs on the public interface of `decidim-budgets`.
    # It mostly handles rendering the created projects associated to a participatory
    # process.
    class AdminEngine < ::Rails::Engine
      isolate_namespace Decidim::Budgets::Admin

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

      routes do
        resources :budgets do
          resources :projects do
            collection do
              post :update_category
              post :update_scope
              post :update_selected
              post :update_budget
              resource :proposals_import, only: [:new, :create]
            end
          end
        end

        resources :projects, exclude: [:index, :new, :create, :edit, :update, :destroy] do
          get :proposals_picker, on: :collection

          resources :attachment_collections, except: [:show]
          resources :attachments, except: [:show]
        end

        root to: "budgets#index"
      end

      def load_seed
        nil
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
decidim-budgets-0.29.1 lib/decidim/budgets/admin_engine.rb
decidim-budgets-0.28.4 lib/decidim/budgets/admin_engine.rb
decidim-budgets-0.29.0 lib/decidim/budgets/admin_engine.rb
decidim-budgets-0.28.3 lib/decidim/budgets/admin_engine.rb
decidim-budgets-0.29.0.rc4 lib/decidim/budgets/admin_engine.rb
decidim-budgets-0.29.0.rc3 lib/decidim/budgets/admin_engine.rb
decidim-budgets-0.29.0.rc2 lib/decidim/budgets/admin_engine.rb
decidim-budgets-0.29.0.rc1 lib/decidim/budgets/admin_engine.rb
decidim-budgets-0.28.2 lib/decidim/budgets/admin_engine.rb
decidim-budgets-0.28.1 lib/decidim/budgets/admin_engine.rb
decidim-budgets-0.28.0 lib/decidim/budgets/admin_engine.rb
decidim-budgets-0.28.0.rc5 lib/decidim/budgets/admin_engine.rb
decidim-budgets-0.28.0.rc4 lib/decidim/budgets/admin_engine.rb