Skip to content

Instantly share code, notes, and snippets.

@talum
Created November 25, 2018 19:38
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/94cb3083d370d5f32ed964eec06a094f to your computer and use it in GitHub Desktop.
Save talum/94cb3083d370d5f32ed964eec06a094f to your computer and use it in GitHub Desktop.
class Lesson < Curriculum
belongs_to :canonical_material, class_name: CourseWork::CanonicalMaterial
has_one :lab, foreign_key: :curriculum_id
def lab?
if $rollout.active?(:remove_content)
canonical_material.lab?
else
!!lab
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment