From 773371e8859ab9acea71235ccf468b9f46ffa75d Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Mon, 9 Jul 2012 16:48:23 +0800 Subject: [PATCH] fix from messy search --- app/controllers/pages_controller.rb | 1 + vendor/built_in_modules/announcement/app/models/bulletin.rb | 2 +- vendor/built_in_modules/news/app/models/news_bulletin.rb | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index 7be301564..ce01c019d 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -60,6 +60,7 @@ class PagesController < ApplicationController def get_item module_app = ModuleApp.first(:conditions => {:key => params[:app_name]}) @item = Item.first(:conditions => {:module_app_id => module_app.id, :app_frontend_url => params[:app_action]}) + #TODO 需要做 error handler 處理沒有新增該模組頁面導致錯誤的可能性 end end diff --git a/vendor/built_in_modules/announcement/app/models/bulletin.rb b/vendor/built_in_modules/announcement/app/models/bulletin.rb index a9e31fa7f..4d93cc13e 100644 --- a/vendor/built_in_modules/announcement/app/models/bulletin.rb +++ b/vendor/built_in_modules/announcement/app/models/bulletin.rb @@ -5,7 +5,7 @@ class Bulletin include Mongoid::Timestamps include Mongoid::MultiParameterAttributes include Impressionist::Impressionable - include NccuSearch + # include NccuSearch scope :searchable,where(:is_checked=>true,:is_hidden=>false,:is_pending=>false) diff --git a/vendor/built_in_modules/news/app/models/news_bulletin.rb b/vendor/built_in_modules/news/app/models/news_bulletin.rb index b2a8191fc..27d310ba7 100644 --- a/vendor/built_in_modules/news/app/models/news_bulletin.rb +++ b/vendor/built_in_modules/news/app/models/news_bulletin.rb @@ -5,8 +5,8 @@ class NewsBulletin include Mongoid::Timestamps include Mongoid::MultiParameterAttributes include Impressionist::Impressionable - include Tire::Model::Search - include Tire::Model::Callbacks +# include Tire::Model::Search + # include Tire::Model::Callbacks # include Redis::Objects