mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-18 11:32:25 -05:00
18 lines
436 B
CoffeeScript
18 lines
436 B
CoffeeScript
|
Classroom = require 'models/Classroom'
|
||
|
CocoCollection = require 'collections/CocoCollection'
|
||
|
|
||
|
module.exports = class Classrooms extends CocoCollection
|
||
|
model: Classroom
|
||
|
url: '/db/classroom'
|
||
|
|
||
|
initialize: ->
|
||
|
@on 'sync', =>
|
||
|
for classroom in @models
|
||
|
classroom.capitalizeLanguageName()
|
||
|
super(arguments...)
|
||
|
|
||
|
fetchMine: (options={}) ->
|
||
|
options.data ?= {}
|
||
|
options.data.ownerID = me.id
|
||
|
@fetch(options)
|