wrote rails engine for later, added ability to add comments and see ones already posted.
This commit is contained in:
parent
e6fead06dc
commit
21dca99ddf
8 changed files with 120 additions and 23 deletions
|
@ -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}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue