Sha256: 2837654221507fe330fb48fac6c14d01b4e93927a2b3a9e9d1e892592890280f

Contents?: true

Size: 936 Bytes

Versions: 40

Compression:

Stored size: 936 Bytes

Contents

# frozen_string_literal: true

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

      paths["db/migrate"] = nil

      routes do
        resources :proposals, only: [:index, :new, :create] do
          resources :proposal_answers, only: [:edit, :update]
        end

        root to: "proposals#index"
      end

      initializer "decidim_proposals.inject_abilities_to_user" do |_app|
        Decidim.configure do |config|
          config.admin_abilities += [
            "Decidim::Proposals::Abilities::AdminAbility",
            "Decidim::Proposals::Abilities::ParticipatoryProcessAdminAbility",
            "Decidim::Proposals::Abilities::ParticipatoryProcessModeratorAbility"
          ]
        end
      end

      def load_seed
        nil
      end
    end
  end
end

Version data entries

40 entries across 40 versions & 2 rubygems

Version Path
decidim-proposals-0.8.4 lib/decidim/proposals/admin_engine.rb
decidim-proposals-0.8.3 lib/decidim/proposals/admin_engine.rb
decidim-proposals-0.8.2 lib/decidim/proposals/admin_engine.rb
decidim-proposals-0.8.1 lib/decidim/proposals/admin_engine.rb
decidim-proposals-0.8.0 lib/decidim/proposals/admin_engine.rb
decidim-proposals-0.7.4 lib/decidim/proposals/admin_engine.rb
decidim-proposals-0.7.3 lib/decidim/proposals/admin_engine.rb
decidim-proposals-0.7.2 lib/decidim/proposals/admin_engine.rb
decidim-proposals-0.7.1 lib/decidim/proposals/admin_engine.rb
decidim-proposals-0.7.0 lib/decidim/proposals/admin_engine.rb
decidim-proposals-0.6.8 lib/decidim/proposals/admin_engine.rb
decidim-0.6.8 decidim-proposals/lib/decidim/proposals/admin_engine.rb
decidim-proposals-0.6.7 lib/decidim/proposals/admin_engine.rb
decidim-0.6.7 decidim-proposals/lib/decidim/proposals/admin_engine.rb
decidim-proposals-0.6.6 lib/decidim/proposals/admin_engine.rb
decidim-0.6.6 decidim-proposals/lib/decidim/proposals/admin_engine.rb
decidim-proposals-0.6.5 lib/decidim/proposals/admin_engine.rb
decidim-0.6.5 decidim-proposals/lib/decidim/proposals/admin_engine.rb
decidim-proposals-0.6.4 lib/decidim/proposals/admin_engine.rb
decidim-0.6.4 decidim-proposals/lib/decidim/proposals/admin_engine.rb