Sha256: b85c8fe4d21eb13fc81594d071905cd3f89e9cf4bdf1f59dbba7a8212994612c

Contents?: true

Size: 975 Bytes

Versions: 9

Compression:

Stored size: 975 Bytes

Contents

# frozen_string_literal: true
require "kaminari"
require "social-share-button"

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

      routes do
        resources :proposals, only: [:create, :new, :index, :show] do
          resource :proposal_vote, only: [:create, :destroy]
        end
        root to: "proposals#index"
      end

      initializer "decidim_proposals.assets" do |app|
        app.config.assets.precompile += %w(decidim_proposals_manifest.js decidim_proposals_manifest.css)
      end

      initializer "decidim_proposals.inject_abilities_to_user" do |_app|
        Decidim.configure do |config|
          config.abilities += ["Decidim::Proposals::Abilities::CurrentUser"]
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
decidim-proposals-0.0.7 lib/decidim/proposals/engine.rb
decidim-0.0.7 decidim-proposals/lib/decidim/proposals/engine.rb
decidim-proposals-0.0.6 lib/decidim/proposals/engine.rb
decidim-0.0.6 decidim-proposals/lib/decidim/proposals/engine.rb
decidim-proposals-0.0.5 lib/decidim/proposals/engine.rb
decidim-0.0.5 decidim-proposals/lib/decidim/proposals/engine.rb
decidim-0.0.4 decidim-proposals/lib/decidim/proposals/engine.rb
decidim-proposals-0.0.3 lib/decidim/proposals/engine.rb
decidim-0.0.3 decidim-proposals/lib/decidim/proposals/engine.rb