wrote rails engine for later, added ability to add comments and see ones already posted.

This commit is contained in:
Philip Arndt 2010-08-28 18:15:53 +12:00
parent e6fead06dc
commit 21dca99ddf
8 changed files with 120 additions and 23 deletions

View file

@ -2,6 +2,24 @@ require 'filters_spam' if defined?(Bundler)
module Refinery
module Blog
class Engine < Rails::Engine
initializer 'blog serves assets' do
app.middleware.insert_after ::ActionDispatch::Static, ::ActionDispatch::Static, "#{root}/public"
end
config.after_initialize do
Refinery::Plugin.register do |plugin|
plugin.name = "refinerycms_blog"
plugin.url = {:controller => '/admin/blog/posts', :action => 'index'}
plugin.menu_match = /^\/?(admin|refinery)\/blog\/?(posts|comments|categories)?/
plugin.activity = {
:class => BlogPost
}
end
end
end if defined?(Rails::Engine)
class << self
def version
%q{0.9.8.0.rc1}