From 28a61c261709389028b5174de7a2e8ed2b36c8fa Mon Sep 17 00:00:00 2001 From: z9hang Date: Thu, 19 Mar 2015 10:13:43 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E6=90=9C=E7=B4=A2=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=97=A0=E6=B3=95=E6=90=9C=E5=88=B0=E8=87=AA=E5=B7=B1?= =?UTF-8?q?=E7=9A=84=E7=A7=81=E6=9C=89=E8=AF=BE=E7=A8=8B=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/courses_service.rb | 2 +- app/services/users_service.rb | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/services/courses_service.rb b/app/services/courses_service.rb index dc6cf8119..4512344ad 100644 --- a/app/services/courses_service.rb +++ b/app/services/courses_service.rb @@ -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 diff --git a/app/services/users_service.rb b/app/services/users_service.rb index f75a84c5b..39ca37d26 100644 --- a/app/services/users_service.rb +++ b/app/services/users_service.rb @@ -193,7 +193,6 @@ class UsersService @current_user.save #raise @current_user.errors.full_message #return @current_user - else raise 'wrong password' end