Skip to content

Instantly share code, notes, and snippets.

@alexrothenberg
Created April 6, 2017 02:58
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 alexrothenberg/669d01520f367a60fba70ad171fd1cb5 to your computer and use it in GitHub Desktop.
Save alexrothenberg/669d01520f367a60fba70ad171fd1cb5 to your computer and use it in GitHub Desktop.
signups = cuco_session.course_signups.includes(:course_role, :course).where(person: family.people)
count = signups.where(person_id: person.id).joins(:course).where(courses: { period_id: period.id }).count
##
x = cuco_session.course_signups
y = x.includes(:course_role, :course)
signups = y.where(person: family.people)
a = signups.where(person_id: person.id)
b = a.joins(:course)
c = b.where(courses: { period_id: period.id })
count = c.count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment