From 3d0a1cef56931e37f822cc10b011b9045997cacf Mon Sep 17 00:00:00 2001 From: "Matt K. Fu" Date: Wed, 15 May 2013 14:57:11 +0800 Subject: [PATCH] 1.fix for syntax error. 2.Making production console works. 3.Making blank site member no errors. --- Gemfile | 2 +- lib/tasks/site.rake | 2 +- .../panel/announcement/widget/bulletins_controller.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 16e6e069..5406ccce 100644 --- a/Gemfile +++ b/Gemfile @@ -50,7 +50,7 @@ gem 'tinymce-rails' gem 'therubyracer' if RUBY_PLATFORM.downcase.include?("linux") gem 'libv8', '~> 3.11.8' if RUBY_PLATFORM.downcase.include?("linux") gem 'mongoid-encryptor', :require => 'mongoid/encryptor' -gem 'rb-readline' if RUBY_PLATFORM.downcase.include?("linux") +gem 'rb-readline','~> 0.4.2' if RUBY_PLATFORM.downcase.include?("linux") gem "impressionist", :git => 'git://github.com/charlotte-ruby/impressionist.git' diff --git a/lib/tasks/site.rake b/lib/tasks/site.rake index 6defde52..c4e1d7fa 100644 --- a/lib/tasks/site.rake +++ b/lib/tasks/site.rake @@ -13,7 +13,7 @@ namespace :site do puts 'Please upload design package (/admin/designs/upload_package ) and run rake site:necessary_data' I18nVariable.create!( :document_class => 'language', :key => 'en', :en => 'English', :zh_tw => '英文' ) I18nVariable.create!( :document_class => 'language', :key => 'zh_tw', :en => 'Chinese', :zh_tw => '中文' ) - + Info.create!(key: "profile", built_in: true, disabled: false, title: {"zh_tw"=>"基本欄位", "en"=>"Basic Info"}, to_search: false) end task :necessary_data => :environment do diff --git a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/widget/bulletins_controller.rb b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/widget/bulletins_controller.rb index e3ff58d4..d7f26693 100644 --- a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/widget/bulletins_controller.rb +++ b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/widget/bulletins_controller.rb @@ -34,7 +34,7 @@ class Panel::Announcement::Widget::BulletinsController < OrbitWidgetController @bulletins = Bulletin.available_for_lang(I18n.locale).can_display.where(:bulletin_category_id => @category_id).any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page] ).per(@page_num) @current_category = BulletinCategory.from_id(@category_id) rescue nil elsif !params[:tag_id].blank? - @bulletins = Bulletin.available_for_lang(I18n.locale).can_display.where(:tagged_ids => params[:tag_id])any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page] ).per(@page_num) + @bulletins = Bulletin.available_for_lang(I18n.locale).can_display.where(:tagged_ids => params[:tag_id]).any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page] ).per(@page_num) else @bulletins = Bulletin.available_for_lang(I18n.locale).can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page] ).per(@page_num) end