From c12bf2b036fa333f6a5b72c5c7480656c50e8371 Mon Sep 17 00:00:00 2001 From: manson Date: Fri, 18 Apr 2014 19:37:31 +0800 Subject: [PATCH] Update Tag and Category --- app/models/bulletin.rb | 1 - lib/announcement/engine.rb | 24 +++++++++++++----------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/app/models/bulletin.rb b/app/models/bulletin.rb index b541ed1..fe5e473 100644 --- a/app/models/bulletin.rb +++ b/app/models/bulletin.rb @@ -1,7 +1,6 @@ class Bulletin include Mongoid::Document include Mongoid::Timestamps - include OrbitCategory::Categorizable include Slug field :title, as: :slug_title, type: String, localize: true diff --git a/lib/announcement/engine.rb b/lib/announcement/engine.rb index 9b1a59d..1e1820f 100644 --- a/lib/announcement/engine.rb +++ b/lib/announcement/engine.rb @@ -1,17 +1,19 @@ module Announcement class Engine < ::Rails::Engine - initializer "announcement" do - OrbitApp.registration "Announcement", :type => "ModuleApp" do - module_label "announcement.announcement" - base_url File.expand_path File.dirname(__FILE__) - widget_methods ["widget"] + initializer "announcement" do + OrbitApp.registration "Announcement", :type => "ModuleApp" do + module_label "announcement.announcement" + base_url File.expand_path File.dirname(__FILE__) + widget_methods ["widget"] + taggable "Bulletin" + categorizable "Bulletin" - side_bar do - head_label_i18n "announcement.announcement", icon_class: "icons-megaphone" + side_bar do + head_label_i18n 'announcement.announcement', icon_class: "icons-megaphone" active_for_controllers ({:private=>['announcements']}) - head_link_path "admin_announcements_path" - end - end - end + head_link_path "admin_announcements_path" + end + end + end end end \ No newline at end of file