lib/meibo/organization.rb in meibo-0.13.0 vs lib/meibo/organization.rb in meibo-0.14.0
- old
+ new
@@ -66,7 +66,23 @@
end
def parent
parent_sourced_id && Meibo.current_roster.organizations.find(parent_sourced_id)
end
+
+ def enrollments
+ Meibo.current_roster.enrollments.where(school_sourced_id: sourced_id)
+ end
+
+ def classes
+ Meibo.current_roster.classes.where(school_sourced_id: sourced_id)
+ end
+
+ def courses
+ Meibo.current_roster.courses.where(org_sourced_id: sourced_id)
+ end
+
+ def roles
+ Meibo.current_roster.roles.where(org_sourced_id: sourced_id)
+ end
end
end