Sha256: 243a8cdb9ec7cf729581e597adda5d7b5150c93e7deb4a5de180b0a0dfad281e

Contents?: true

Size: 979 Bytes

Versions: 3

Compression:

Stored size: 979 Bytes

Contents

# frozen_string_literal: true

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

      paths["db/migrate"] = nil
      paths["lib/tasks"] = nil

      routes do
        resources :meetings, only: [:index], format: :html
        root to: "meetings#index", format: :html
      end

      def load_seed
        nil
      end

      initializer "decidim.meetings.content_blocks" do
        Decidim.content_blocks.register(:homepage, :upcoming_events) do |content_block|
          content_block.cell = "decidim/meetings/content_blocks/upcoming_events"
          content_block.public_name_key = "decidim.meetings.content_blocks.upcoming_events.name"
          content_block.default!
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
decidim-meetings-0.15.2 lib/decidim/meetings/directory_engine.rb
decidim-meetings-0.15.1 lib/decidim/meetings/directory_engine.rb
decidim-meetings-0.15.0 lib/decidim/meetings/directory_engine.rb