aboutsummaryrefslogtreecommitdiffstats
path: root/lib/refinerycms-blog.rb
diff options
context:
space:
mode:
authorPhilip Arndt <parndt@gmail.com>2010-08-28 18:15:53 +1200
committerPhilip Arndt <parndt@gmail.com>2010-08-28 18:15:53 +1200
commit21dca99ddf7eadb929bc9fe40a6b3f9fd90b2f41 (patch)
tree920043fe637f02bde2ca7a41b9c714e6fd7633f1 /lib/refinerycms-blog.rb
parente6fead06dcc6c27e47df83533b53256beabc21a5 (diff)
downloadrefinerycms-blog-21dca99ddf7eadb929bc9fe40a6b3f9fd90b2f41.tar.gz
refinerycms-blog-21dca99ddf7eadb929bc9fe40a6b3f9fd90b2f41.tar.bz2
refinerycms-blog-21dca99ddf7eadb929bc9fe40a6b3f9fd90b2f41.zip
wrote rails engine for later, added ability to add comments and see ones already posted.
Diffstat (limited to 'lib/refinerycms-blog.rb')
-rw-r--r--lib/refinerycms-blog.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/refinerycms-blog.rb b/lib/refinerycms-blog.rb
index 461e75c..c322faf 100644
--- a/lib/refinerycms-blog.rb
+++ b/lib/refinerycms-blog.rb
@@ -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}