Merge pull request #92 from ruprict/master

Fix plugin pathname
This commit is contained in:
Uģis Ozols 2011-07-01 09:22:59 -07:00
commit 0076d0a9fa

View file

@ -6,6 +6,10 @@ module Refinery
autoload :Tab, File.expand_path("../refinery/blog/tabs", __FILE__) autoload :Tab, File.expand_path("../refinery/blog/tabs", __FILE__)
class << self class << self
attr_accessor :root
def root
@root ||= Pathname.new(File.expand_path('../../', __FILE__))
end
def version def version
::Refinery::Blog::Version.to_s ::Refinery::Blog::Version.to_s
end end
@ -22,6 +26,7 @@ module Refinery
config.after_initialize do config.after_initialize do
Refinery::Plugin.register do |plugin| Refinery::Plugin.register do |plugin|
plugin.pathname = root
plugin.name = "refinerycms_blog" plugin.name = "refinerycms_blog"
plugin.url = {:controller => '/admin/blog/posts', :action => 'index'} plugin.url = {:controller => '/admin/blog/posts', :action => 'index'}
plugin.menu_match = /^\/?(admin|refinery)\/blog\/?(posts|comments|categories)?/ plugin.menu_match = /^\/?(admin|refinery)\/blog\/?(posts|comments|categories)?/