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.6.6 lib/decidim/surveys/admin_engine.rb
decidim-0.6.6 decidim-surveys/lib/decidim/surveys/admin_engine.rb
decidim-surveys-0.6.5 lib/decidim/surveys/admin_engine.rb
decidim-0.6.5 decidim-surveys/lib/decidim/surveys/admin_engine.rb
decidim-surveys-0.6.4 lib/decidim/surveys/admin_engine.rb
decidim-0.6.4 decidim-surveys/lib/decidim/surveys/admin_engine.rb
decidim-surveys-0.6.3 lib/decidim/surveys/admin_engine.rb
decidim-0.6.3 decidim-surveys/lib/decidim/surveys/admin_engine.rb
decidim-surveys-0.6.2 lib/decidim/surveys/admin_engine.rb
decidim-0.6.2 decidim-surveys/lib/decidim/surveys/admin_engine.rb
decidim-surveys-0.6.1 lib/decidim/surveys/admin_engine.rb
decidim-0.6.1 decidim-surveys/lib/decidim/surveys/admin_engine.rb
decidim-surveys-0.6.0 lib/decidim/surveys/admin_engine.rb
decidim-0.6.0 decidim-surveys/lib/decidim/surveys/admin_engine.rb