课程搜索接口无法搜到自己的私有课程问题

This commit is contained in:
z9hang 2015-03-19 10:13:43 +08:00
parent 9d686349da
commit 28a61c2617
2 changed files with 1 additions and 2 deletions

View File

@ -38,7 +38,7 @@ class CoursesService
if name.blank?
raise 'sumbit empty'
end
@courses = courses_all.visible
@courses = courses_all.visible(current_user)
if params[:name].present?
@courses_all = @courses.like(params[:name])
else

View File

@ -193,7 +193,6 @@ class UsersService
@current_user.save
#raise @current_user.errors.full_message
#return @current_user
else
raise 'wrong password'
end