aboutsummaryrefslogtreecommitdiffstats
path: root/lib/refinerycms-blog.rb
blob: cb7ed7063c6a3ce698384e5b5a33b8db40f41a2d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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{1.0.rc1}
      end
    end
  end
end