Skip to content

Instantly share code, notes, and snippets.

@bjensen
Last active April 21, 2019 17:12
Show Gist options
  • Save bjensen/32a72c801abf06f4edb9246b8f34dc47 to your computer and use it in GitHub Desktop.
Save bjensen/32a72c801abf06f4edb9246b8f34dc47 to your computer and use it in GitHub Desktop.
class AttendanceTimesForTeam
def self.get(team_id, current_user, only_team_activities)
AttendanceTime.
joins(attendance: {stay: :student}).
where(
'stays.team_id': team_id,
'attendances.is_team_activity': only_team_activities,
'students.fgu_institution_id': current_user.fgu_institution_id
)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment