Sha256: 5b7514b8f8adc1cdf4476b775cce3dd59aa61026ae864976ee13be807616da94

Contents?: true

Size: 920 Bytes

Versions: 34

Compression:

Stored size: 920 Bytes

Contents

# frozen_string_literal: true

require "jquery-tmpl-rails"

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

      paths["db/migrate"] = nil

      routes do
        post "/", to: "surveys#update", as: :survey
        root to: "surveys#edit"
      end

      initializer "decidim_surveys.admin_assets" do |app|
        app.config.assets.precompile += %w(admin/decidim_surveys_manifest.js)
      end

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

      def load_seed
        nil
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 2 rubygems

Version Path
decidim-surveys-0.10.1 lib/decidim/surveys/admin_engine.rb
decidim-surveys-0.10.0 lib/decidim/surveys/admin_engine.rb
decidim-surveys-0.9.3 lib/decidim/surveys/admin_engine.rb
decidim-surveys-0.9.2 lib/decidim/surveys/admin_engine.rb
decidim-surveys-0.9.1 lib/decidim/surveys/admin_engine.rb
decidim-surveys-0.9.0 lib/decidim/surveys/admin_engine.rb
decidim-surveys-0.8.4 lib/decidim/surveys/admin_engine.rb
decidim-surveys-0.8.3 lib/decidim/surveys/admin_engine.rb
decidim-surveys-0.8.2 lib/decidim/surveys/admin_engine.rb
decidim-surveys-0.8.1 lib/decidim/surveys/admin_engine.rb
decidim-surveys-0.8.0 lib/decidim/surveys/admin_engine.rb
decidim-surveys-0.7.4 lib/decidim/surveys/admin_engine.rb
decidim-surveys-0.7.3 lib/decidim/surveys/admin_engine.rb
decidim-surveys-0.7.2 lib/decidim/surveys/admin_engine.rb
decidim-surveys-0.7.1 lib/decidim/surveys/admin_engine.rb
decidim-surveys-0.7.0 lib/decidim/surveys/admin_engine.rb
decidim-surveys-0.6.8 lib/decidim/surveys/admin_engine.rb
decidim-0.6.8 decidim-surveys/lib/decidim/surveys/admin_engine.rb
decidim-surveys-0.6.7 lib/decidim/surveys/admin_engine.rb
decidim-0.6.7 decidim-surveys/lib/decidim/surveys/admin_engine.rb