Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: fd6770efe7
Fetching contributors…

Cannot retrieve contributors at this time

15 lines (11 sloc) 0.412 kB
_ = require 'underscore'
mongoose = require 'mongoose'
env = require '../config/env'
ServiceSchema = module.exports = new mongoose.Schema
name: String
description: String
ServiceSchema.static 'sorted', (callback) ->
Service.find (error, services) ->
return callback(error) if error
callback null, _.sortBy(services, (s) -> s.name.toLowerCase())
Service = mongoose.model 'Service', ServiceSchema
Jump to Line
Something went wrong with that request. Please try again.