diff options
author | Uģis Ozols <ugis.ozolss@gmail.com> | 2011-07-27 13:46:24 +0300 |
---|---|---|
committer | Uģis Ozols <ugis.ozolss@gmail.com> | 2011-07-27 13:46:24 +0300 |
commit | 3fa8937b95a4d90000ad1be9c588424052136455 (patch) | |
tree | 07e61cd13bd88a76d13c3d759475d67d088d5f6e /lib/refinerycms-blog.rb | |
parent | e5db679226bac7ef8ddd568c40f52addd52d7a8a (diff) | |
download | refinerycms-blog-3fa8937b95a4d90000ad1be9c588424052136455.tar.gz refinerycms-blog-3fa8937b95a4d90000ad1be9c588424052136455.tar.bz2 refinerycms-blog-3fa8937b95a4d90000ad1be9c588424052136455.zip |
Rails 3.1 - wip.
Diffstat (limited to 'lib/refinerycms-blog.rb')
-rw-r--r-- | lib/refinerycms-blog.rb | 9 |
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 |