class Admin::CourseSemestersController < OrbitMemberController def index end def new @course_semester = CourseSemester.new @url = admin_course_semesters_path end def edit @course_semester = CourseSemester.find(params[:id]) @url = admin_course_semester_path(@course_semester) end def create course_semester = CourseSemester.create(course_semester_params) @course_semesters = CourseSemester.all end def update course_semester = CourseSemester.find(params[:id]) rescue nil if !course_semester.nil? course_semester.update_attributes(course_semester_params) end @course_semesters = CourseSemester.all end def destroy course_semester = CourseSemester.find(params[:id]) rescue nil if !course_semester.nil? course_semester.destroy end @course_semesters = CourseSemester.all end private def course_semester_params params.require(:course_semester).permit! end end