Sha256: 1feeb3d8938ab516ae659768e992f06bf7699eb01919b53c48c871acc1265914

Contents?: true

Size: 813 Bytes

Versions: 3

Compression:

Stored size: 813 Bytes

Contents

# frozen_string_literal: true

module Homeland::Site
  class Engine < ::Rails::Engine
    isolate_namespace Homeland::Site

    initializer "homeland.site.init" do |app|
      next unless (defined? Setting) && Setting.has_module?(:site)
      Homeland.register_plugin do |plugin|
        plugin.name = Homeland::Site::NAME
        plugin.display_name = "酷站"
        plugin.version = Homeland::Site::VERSION
        plugin.description = Homeland::Site::DESCRIPTION
        plugin.navbar_link = true
        plugin.admin_navbar_link = true
        plugin.root_path = "/sites"
        plugin.admin_path = "/admin/sites"
      end

      app.routes.prepend do
        mount Homeland::Site::Engine => "/"
      end
      app.config.paths["db/migrate"].concat(config.paths["db/migrate"].expanded)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
homeland-site-0.3.2 lib/homeland/site/engine.rb
homeland-site-0.3.1 lib/homeland/site/engine.rb
homeland-site-0.3.0 lib/homeland/site/engine.rb