diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 973e73dac..bb0737128 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -169,7 +169,7 @@ class CoursesController < ApplicationController extra_params[:school_id] = @school.id extra_params[:is_public] = params[:is_public].present? ? params[:is_public] : 0 - if @course.is_end && (course_params[:end_date].nil? || course_params[:end_date].to_date > Date.today) + if @course.is_end && (course_params[:end_date].blank? || course_params[:end_date].to_date > Date.today) extra_params[:is_end] = 0 elsif !@course.is_end && !course_params[:end_date].blank? && course_params[:end_date].to_date < Date.today extra_params[:is_end] = 1