Sha256: 863d04c0d4e917c3a412a4f298741919b80105f987d6629306ceb4e3413faea7
Contents?: true
Size: 931 Bytes
Versions: 3
Compression:
Stored size: 931 Bytes
Contents
# frozen_string_literal: true require "rails" require "decidim/core" module Decidim module <%= component_module_name %> # This is the engine that runs on the public interface of <%= component_name %>. class Engine < ::Rails::Engine isolate_namespace Decidim::<%= component_module_name %> routes do # Add engine routes here # resources :<%= component_name %> # root to: "<%= component_name %>#index" end initializer "decidim_<%= component_name %>.assets" do |app| app.config.assets.precompile += %w[decidim_<%= component_name %>_manifest.js decidim_<%= component_name %>_manifest.css] end initializer "decidim_<%= component_name %>.inject_abilities_to_user" do |_app| Decidim.configure do |config| config.abilities += ["Decidim::<%= component_module_name %>::Abilities::CurrentUserAbility"] end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems