进入其他人个人主页时,点击他创建的课程报错
This commit is contained in:
parent
9c704b7dc1
commit
a667d97768
|
@ -120,9 +120,9 @@ class UsersController < ApplicationController
|
||||||
end
|
end
|
||||||
projects = @user.projects.visible.order("updated_on desc")
|
projects = @user.projects.visible.order("updated_on desc")
|
||||||
if(params[:status] == '1')
|
if(params[:status] == '1')
|
||||||
projects = projects.where("user_id = ?",@user.id)
|
projects = projects.where("projects.user_id = ?",@user.id)
|
||||||
elsif(params[:status] == '2')
|
elsif(params[:status] == '2')
|
||||||
projects = projects.where("user_id <> ?",@user.id)
|
projects = projects.where("projects.user_id <> ?",@user.id)
|
||||||
end
|
end
|
||||||
@list = paginateHelper projects,10
|
@list = paginateHelper projects,10
|
||||||
@params = params[:status]
|
@params = params[:status]
|
||||||
|
@ -261,17 +261,15 @@ class UsersController < ApplicationController
|
||||||
|
|
||||||
# modified by fq
|
# modified by fq
|
||||||
def user_newfeedback
|
def user_newfeedback
|
||||||
@jours = @user.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC')
|
jours = @user.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC')
|
||||||
@jours.update_all(:is_readed => true, :status => false)
|
jours.update_all(:is_readed => true, :status => false)
|
||||||
@jours.each do |journal|
|
jours.each do |journal|
|
||||||
fetch_user_leaveWord_reply(journal).update_all(:is_readed => true, :status => false)
|
fetch_user_leaveWord_reply(journal).update_all(:is_readed => true, :status => false)
|
||||||
end
|
end
|
||||||
@jour = paginateHelper @jours,10
|
@jour = paginateHelper jours,10
|
||||||
@state = false
|
@state = false
|
||||||
|
|
||||||
render :layout=>'base_users_new'
|
render :layout=>'base_users_new'
|
||||||
end
|
end
|
||||||
# end
|
|
||||||
|
|
||||||
def user_comments
|
def user_comments
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue