Sha256: 7f1be4de9c005196c6417b037163daeac6ddf0098ca6932c75e21b9fe427e974
Contents?: true
Size: 706 Bytes
Versions: 5
Compression:
Stored size: 706 Bytes
Contents
class Ecm::Courses::CoursesController < ApplicationController def calendar @year = params[:year] ||= Time.zone.now.year @month = params[:month] ||= Time.zone.now.month @date = Date.strptime("#{@month}-#{@year}", "%m-%Y") @course = Ecm::Courses::Course.includes(:ecm_courses_course_category, :ecm_courses_course_dates).find(params[:id]) @course_dates = @course.ecm_courses_course_dates.for_month(@date).all end def index @courses = Ecm::Courses::Course.includes(:ecm_courses_course_category, :ecm_courses_course_dates).all end def show @course = Ecm::Courses::Course.includes(:ecm_courses_course_category, :ecm_courses_course_dates).find(params[:id]) end end
Version data entries
5 entries across 5 versions & 1 rubygems