bisscomm/refinerycms-image-slideshows

View on GitHub
lib/refinery/image_slideshows/engine.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Refinery
  module ImageSlideshows
    class Engine < Rails::Engine
      include Refinery::Engine
      isolate_namespace Refinery::ImageSlideshows

      engine_name :refinery_image_slideshows

      initializer "register refinerycms_image_slideshows plugin" do
        Refinery::Plugin.register do |plugin|
          plugin.name = "refinery_image_slideshows"
          plugin.url = proc { Refinery::Core::Engine.routes.url_helpers.image_slideshows_admin_image_slideshows_path }
          plugin.pathname = root
          plugin.menu_match = %r{refinery/(image_slides|image_slideshows)(/.+?)?$}
        end
      end

      config.after_initialize do
        Refinery.register_extension(Refinery::ImageSlideshows)
      end
    end
  end
end