codecombat/app/collections/ThangNamesCollection.coffee

16 lines
490 B
CoffeeScript
Raw Normal View History

ThangType = require 'models/ThangType'
CocoCollection = require 'collections/CocoCollection'
module.exports = class ThangNamesCollection extends CocoCollection
url: '/db/thang.type/names'
model: ThangType
isCachable: false
constructor: (@ids) -> super()
2014-06-30 22:16:26 -04:00
fetch: (options) ->
options ?= {}
2014-10-02 01:02:52 -04:00
method = if application.isIPadApp then 'GET' else 'POST' # Not sure why this was required that one time.
_.extend options, {type: method, data: {ids: @ids}}
super(options)