Last active
November 25, 2018 19:29
-
-
Save talum/15cb9886eeac36fcc8e6a63a3781ee42 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Track < Curriculum | |
def labs | |
if $rollout.active?(:remove_content) | |
CourseWork::CanonicalMaterial | |
.joins(:lessons) | |
.where(curriculums: {track_id: self.id}) | |
.where(kind: CourseWork::CanonicalMaterial::LAB_KINDS) | |
else | |
Lab.where(track_id: self.id) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment