aboutsummaryrefslogtreecommitdiffstats
path: root/lib/refinery/banners/engine.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/refinery/banners/engine.rb')
-rw-r--r--lib/refinery/banners/engine.rb32
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/refinery/banners/engine.rb b/lib/refinery/banners/engine.rb
new file mode 100644
index 0000000..0299bb8
--- /dev/null
+++ b/lib/refinery/banners/engine.rb
@@ -0,0 +1,32 @@
+module Refinery
+ module Banners
+ class Engine < Rails::Engine
+ include Refinery::Engine
+ isolate_namespace Refinery::Banners
+
+ engine_name :refinery_banners
+
+ initializer "register refinerycms_banners plugin" do
+ Refinery::Plugin.register do |plugin|
+ plugin.name = "banners"
+ plugin.url = proc { Refinery::Core::Engine.routes.url_helpers.banners_admin_banners_path }
+ plugin.pathname = root
+ plugin.activity = {
+ :class_name => :'refinery/banners/banner',
+ :title => 'name'
+ }
+
+ end
+ end
+
+ config.to_prepare do
+ require 'page_extensions'
+ Refinery::Page.send :include, Refinery::Banners::Extensions::Page
+ end
+
+ config.after_initialize do
+ Refinery.register_extension(Refinery::Banners)
+ end
+ end
+ end
+end