From f08b04d6458cbbb372f2ac6d2f6b48f9c8025710 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 14 Nov 2016 16:06:54 +0800 Subject: [PATCH] =?UTF-8?q?My=20Issue=E6=9C=AA=E5=AE=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index b1d458d49..b45e304ca 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -86,6 +86,18 @@ class UsersController < ApplicationController helper :issues include UsersHelper + # 获取我的任务 + # order 排序条件 + def user_issues + # Issues = Issue.visible.open.where("assigned_to_id = #{assigned_to_id} or author_id = #{User.current.id} er_course_ids.join(',')}) and container_type = 'Course')"+ + # "or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')}) + # and is_publish = 1 and container_id is not null)" ).order("#{order.nil? ? 'created_on' : order} #{score}") + # + # @issues = @Issues= Issue.visible.open. + # where(:assigned_to_id => User.current.id) + end + + #展开所有回复 def show_all_replies case params[:type]