Skip to content

Instantly share code, notes, and snippets.

@talum
Last active November 25, 2018 19:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save talum/15cb9886eeac36fcc8e6a63a3781ee42 to your computer and use it in GitHub Desktop.
Save talum/15cb9886eeac36fcc8e6a63a3781ee42 to your computer and use it in GitHub Desktop.
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