原来的提交被覆盖了。
This commit is contained in:
parent
0be91202d7
commit
cf83209c58
|
@ -31,17 +31,17 @@ class CoursesController < ApplicationController
|
|||
|
||||
def join
|
||||
if User.current.logged?
|
||||
if params[:role] == 10
|
||||
# if params[:role] == 10
|
||||
cs = CoursesService.new
|
||||
@user = User.current
|
||||
join = cs.join_course params,user
|
||||
join = cs.join_course params,@user
|
||||
@state = join[:state]
|
||||
@course = join[:course]
|
||||
else
|
||||
@course = Course.find_by_id params[:object_id]
|
||||
CourseMessage.create(:user_id => @course.tea_id, :course_id => @course.id, :viewed => false,:content=> params[:role],:course_message_id=>User.current.id,:course_message_type=>'JoinCourseRequest')
|
||||
@state = 6
|
||||
end
|
||||
# else
|
||||
# @course = Course.find_by_id params[:object_id]
|
||||
# CourseMessage.create(:user_id => @course.tea_id, :course_id => @course.id, :viewed => false,:content=> params[:role],:course_message_id=>User.current.id,:course_message_type=>'JoinCourseRequest')
|
||||
# @state = 6
|
||||
# end
|
||||
else
|
||||
@state = 5 #未登录
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue