Sha256: 07ec02573313c92efee27efd8aaa7616b0249ee37ba39b7b29b92ca5d8a64a4c

Contents?: true

Size: 1.02 KB

Versions: 35

Compression:

Stored size: 1.02 KB

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]
          resource :proposal_widget, only: :show, path: "embed"
        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::CurrentUserAbility"]
        end
      end
    end
  end
end

Version data entries

35 entries across 35 versions & 2 rubygems

Version Path
decidim-proposals-0.7.4 lib/decidim/proposals/engine.rb
decidim-proposals-0.7.3 lib/decidim/proposals/engine.rb
decidim-proposals-0.7.2 lib/decidim/proposals/engine.rb
decidim-proposals-0.7.1 lib/decidim/proposals/engine.rb
decidim-proposals-0.7.0 lib/decidim/proposals/engine.rb
decidim-proposals-0.6.8 lib/decidim/proposals/engine.rb
decidim-0.6.8 decidim-proposals/lib/decidim/proposals/engine.rb
decidim-proposals-0.6.7 lib/decidim/proposals/engine.rb
decidim-0.6.7 decidim-proposals/lib/decidim/proposals/engine.rb
decidim-proposals-0.6.6 lib/decidim/proposals/engine.rb
decidim-0.6.6 decidim-proposals/lib/decidim/proposals/engine.rb
decidim-proposals-0.6.5 lib/decidim/proposals/engine.rb
decidim-0.6.5 decidim-proposals/lib/decidim/proposals/engine.rb
decidim-proposals-0.6.4 lib/decidim/proposals/engine.rb
decidim-0.6.4 decidim-proposals/lib/decidim/proposals/engine.rb
decidim-proposals-0.6.3 lib/decidim/proposals/engine.rb
decidim-0.6.3 decidim-proposals/lib/decidim/proposals/engine.rb
decidim-proposals-0.6.2 lib/decidim/proposals/engine.rb
decidim-0.6.2 decidim-proposals/lib/decidim/proposals/engine.rb
decidim-proposals-0.6.1 lib/decidim/proposals/engine.rb