aboutsummaryrefslogtreecommitdiffstats
path: root/lib/refinerycms-blog.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/refinerycms-blog.rb')
-rw-r--r--lib/refinerycms-blog.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/refinerycms-blog.rb b/lib/refinerycms-blog.rb
index 452863b..10be99d 100644
--- a/lib/refinerycms-blog.rb
+++ b/lib/refinerycms-blog.rb
@@ -1,4 +1,5 @@
require 'filters_spam'
+require File.expand_path('../generators/blog_generator', __FILE__)
module Refinery
module Blog
@@ -25,14 +26,14 @@ module Refinery
require File.expand_path('../refinery/blog/tabs', __FILE__)
end
- config.after_initialize do
+ initializer "init plugin", :after => :set_routes_reloader do |app|
Refinery::Plugin.register do |plugin|
plugin.pathname = root
plugin.name = "refinerycms_blog"
- plugin.url = {:controller => '/admin/blog/posts', :action => 'index'}
- plugin.menu_match = /^\/?(admin|refinery)\/blog\/?(posts|comments|categories)?/
+ plugin.url = app.routes.url_helpers.refinery_admin_blog_posts_path
+ plugin.menu_match = /^\/refinery\/blog\/?(posts|comments|categories)?/
plugin.activity = {
- :class => BlogPost
+ :class => Refinery::BlogPost
}
end
end