Commit ede77540 authored by Zach Perkins's avatar Zach Perkins

Rubocop, my old foe

parent 9f011a08
Pipeline #3221 passed with stage
in 2 minutes and 12 seconds
......@@ -25,11 +25,11 @@ class SchedulesController < ApplicationController
"S": Date.new(2019, 1, 19),
"U": Date.new(2019, 1, 20)
}.freeze
def show
@events = @cart.map do |_cid, sections|
s = sections.first
s.days.split('').map do |day|
formatted_date = DAYS[day.to_sym].to_s.tr('-', '')
time = Time.parse(s.start_time).strftime("%H%M%S")
......@@ -41,7 +41,6 @@ class SchedulesController < ApplicationController
end: "#{formatted_date}T#{endtime}"
}
end
end.flatten
end
end
......@@ -13,9 +13,9 @@ class CourseSection < ApplicationRecord
def labs
return nil unless section_type == "Lecture"
lecture_number = name.split[name.split.length-1]
lecture_number = name.split[name.split.length - 1]
course.course_sections.select do |s|
s.title.split[s.title.split.length-1] == lecture_number
s.title.split[s.title.split.length - 1] == lecture_number
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment