Sha256: 75d391d6b92692376445a4d83200a00f72280bbdce161e997a8d98fb77df0e2b

Contents?: true

Size: 930 Bytes

Versions: 26

Compression:

Stored size: 930 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

      initializer "decidim_blogs.webpacker.assets_path" do
        Decidim.register_assets_path File.expand_path("app/packs", root)
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
decidim-blogs-0.27.9 lib/decidim/blogs/engine.rb
decidim-blogs-0.27.8 lib/decidim/blogs/engine.rb
decidim-blogs-0.27.7 lib/decidim/blogs/engine.rb
decidim-blogs-0.27.6 lib/decidim/blogs/engine.rb
decidim-blogs-0.26.10 lib/decidim/blogs/engine.rb
decidim-blogs-0.26.9 lib/decidim/blogs/engine.rb
decidim-blogs-0.27.5 lib/decidim/blogs/engine.rb
decidim-blogs-0.26.8 lib/decidim/blogs/engine.rb
decidim-blogs-0.27.4 lib/decidim/blogs/engine.rb
decidim-blogs-0.27.3 lib/decidim/blogs/engine.rb
decidim-blogs-0.26.7 lib/decidim/blogs/engine.rb
decidim-blogs-0.26.5 lib/decidim/blogs/engine.rb
decidim-blogs-0.27.2 lib/decidim/blogs/engine.rb
decidim-blogs-0.27.1 lib/decidim/blogs/engine.rb
decidim-blogs-0.26.4 lib/decidim/blogs/engine.rb
decidim-blogs-0.27.0 lib/decidim/blogs/engine.rb
decidim-blogs-0.26.3 lib/decidim/blogs/engine.rb
decidim-blogs-0.27.0.rc2 lib/decidim/blogs/engine.rb
decidim-blogs-0.27.0.rc1 lib/decidim/blogs/engine.rb
decidim-blogs-0.26.2 lib/decidim/blogs/engine.rb