From 4906bad7d2fc4882a3b78f59ba02e47be7a34b97 Mon Sep 17 00:00:00 2001 From: z9hang Date: Tue, 1 Jul 2014 09:15:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E8=BF=9B=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/journals_for_message.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/journals_for_message.rb b/app/models/journals_for_message.rb index 997bb6f6..f2b69da8 100644 --- a/app/models/journals_for_message.rb +++ b/app/models/journals_for_message.rb @@ -15,9 +15,9 @@ class JournalsForMessage < ActiveRecord::Base "m_reply_id" # 回复某留言的留言id(a留言回复了b留言,这是b留言的id) acts_as_tree :foreign_key => 'm_parent_id', :counter_cache => :m_reply_count, :order => "#{JournalsForMessage.table_name}.created_on ASC" - belongs_to :project - #:foreign_key => 'jour_id', - #:conditions => "#{self.table_name}.jour_type = 'Project' " + belongs_to :project, + :foreign_key => 'jour_id', + :conditions => "#{self.table_name}.jour_type = 'Project' " belongs_to :course, :foreign_key => 'jour_id', :conditions => "#{self.table_name}.jour_type = 'Course' "