diff --git a/app/helpers/welcome_helper.rb b/app/helpers/welcome_helper.rb index 4964e6cd2..26d61f94e 100644 --- a/app/helpers/welcome_helper.rb +++ b/app/helpers/welcome_helper.rb @@ -137,7 +137,7 @@ module WelcomeHelper #获取课程列表 # add by nwb def find_miracle_course(sum=10, max_rate=7, school_id) - if User.current.user_extensions.school.nil? and school_id.nil? + if User.current.user_extensions.nil? && User.current.user_extensions.school.nil? and school_id.nil? Course.active.visible. joins(:memberships). group('members.course_id'). diff --git a/app/views/layouts/_base_header.html.erb b/app/views/layouts/_base_header.html.erb index db275b90b..b0daf8c88 100644 --- a/app/views/layouts/_base_header.html.erb +++ b/app/views/layouts/_base_header.html.erb @@ -34,7 +34,7 @@