mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 15:48:11 -05:00
21 lines
613 B
CoffeeScript
21 lines
613 B
CoffeeScript
CocoModel = require './CocoModel'
|
|
schema = require 'schemas/models/trial_request.schema'
|
|
|
|
module.exports = class TrialRequest extends CocoModel
|
|
@className: 'TrialRequest'
|
|
@schema: schema
|
|
urlRoot: '/db/trial.request'
|
|
|
|
nameString: ->
|
|
props = @get('properties')
|
|
values = _.filter(_.at(props, 'name', 'email'))
|
|
return values.join(' / ')
|
|
|
|
locationString: ->
|
|
props = @get('properties')
|
|
values = _.filter(_.at(props, 'city', 'state', 'country'))
|
|
return values.join(' ')
|
|
|
|
educationLevelString: ->
|
|
levels = @get('properties').educationLevel or []
|
|
return levels.join(', ')
|