Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
schedules
Commits
252c2ec9
Commit
252c2ec9
authored
Dec 16, 2018
by
Zac Wood
Browse files
rubocooooooop
parent
83a1b1c8
Pipeline
#3499
passed with stages
in 26 minutes and 42 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
schedules/app/models/course_section.rb
View file @
252c2ec9
...
@@ -18,7 +18,7 @@ class CourseSection < ApplicationRecord
...
@@ -18,7 +18,7 @@ class CourseSection < ApplicationRecord
end
end
def
self
.
latest_by_crn
(
crn
)
def
self
.
latest_by_crn
(
crn
)
where
(
crn:
crn
).
sort
_by
{
|
s
|
s
.
course
.
semester
.
id
}
.
first
where
(
crn:
crn
).
min
_by
{
|
s
|
s
.
course
.
semester
.
id
}
end
end
# Select all course sections that have an instructor that matches the given name
# Select all course sections that have an instructor that matches the given name
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment