[BUG] 在小组频道里出现了非小组的话题
Reported by makestory | 2010-02-20 18:08:11 UTC
在小组频道里,"我发起的话题"、"和我参与的话题"中包含了来自学校的话题,而实际上不该包含。
Comments and changes to this ticket
-

makestory 2010-02-23 17:04:19 UTC
- State changed from new to resolved
在user.rb 里增加了方法
只包含在小组参与的话题
def participated_group_topics
self.posts.find(:all, :conditions => ['topics.deleted_at IS NULL'], :include => [:topic]).map{|p| p.topic if p.board.talkable_type == "GroupBoard"}.uniq.compactend
只包含在小组发起的话题
def group_topics
self.topics.find(:all, :conditions => ["boards.talkable_type = ?","GroupBoard"],:include => [:board])end
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »