Permalink
Browse files

Attempts to get the plugin to load on initialization

  • Loading branch information...
1 parent 396b172 commit 1ab6ba45073b8399dfacb63a5507a73d49680d1f davidray committed Dec 29, 2010
Showing with 21 additions and 18 deletions.
  1. +1 −18 lib/podcasts.rb
  2. +20 −0 lib/refinerycms-podcasts.rb
View
@@ -1,18 +1 @@
-require 'refinery'
-
-module Refinery
- module Podcasts
- class Engine < Rails::Engine
- initializer "static assets" do |app|
- app.middleware.insert_after ::ActionDispatch::Static, ::ActionDispatch::Static, "#{root}/public"
- end
-
- config.after_initialize do
- Refinery::Plugin.register do |plugin|
- plugin.name = "podcasts"
- plugin.activity = {:class => Podcast}
- end
- end
- end
- end
-end
+require 'refinery'
@@ -0,0 +1,20 @@
+require File.expand_path('../podcasts', __FILE__)
+
+module Refinery
+ module Podcasts
+ class Engine < Rails::Engine
+ initializer "static assets" do |app|
+ app.middleware.insert_after ::ActionDispatch::Static, ::ActionDispatch::Static, "#{root}/public"
+ end
+
+ config.after_initialize do
+ Refinery::Plugin.register do |plugin|
+ plugin.name = "podcasts"
+ plugin.directory = "podcasts"
+ plugin.menu_match = /(refinery|admin)\/podcast(s|_settings)$/
+ plugin.activity = {:class => Podcast}
+ end
+ end
+ end
+ end
+end

0 comments on commit 1ab6ba4

Please sign in to comment.