Sha256: 9dd6e4554c6becf88c2540833da6a16fd672590b2fb7c23dc60fb6980441de6b

Contents?: true

Size: 787 Bytes

Versions: 5

Compression:

Stored size: 787 Bytes

Contents

# frozen_string_literal: true

require "rails"
require "active_support/all"

require "decidim/core"

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

      routes do
        resources :posts, only: [:index, :show]
        root to: "posts#index"
      end

      initializer "decidim_blogs.add_cells_view_paths" do
        Cell::ViewModel.view_paths << File.expand_path("#{Decidim::Blogs::Engine.root}/app/cells")
        Cell::ViewModel.view_paths << File.expand_path("#{Decidim::Blogs::Engine.root}/app/views") # for partials
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
decidim-blogs-0.25.0 lib/decidim/blogs/engine.rb
decidim-blogs-0.25.0.rc4 lib/decidim/blogs/engine.rb
decidim-blogs-0.25.0.rc3 lib/decidim/blogs/engine.rb
decidim-blogs-0.25.0.rc2 lib/decidim/blogs/engine.rb
decidim-blogs-0.25.0.rc1 lib/decidim/blogs/engine.rb