@leansdk/leanrc
Version:
LeanRC is a MVC framework for creating graceful applications
39 lines (26 loc) • 807 B
text/coffeescript
module.exports = (Module)->
{
Resource
BodyParseMixin
} = Module::
class TomatosResource extends Resource
BodyParseMixin
Module
# 'checkSchemaVersion'
'parseBody', only: ['create', 'update']
entityName: String,
default: 'tomato'
keyName: String,
get: -> 'tomato'
itemEntityName: String,
get: -> 'tomato'
listEntityName: String,
get: -> 'tomatos'
collectionName: String,
get: -> 'TomatosCollection'
getCucumbers: Function,
default: ->
cucucmbers = .retrieveProxy 'CucumbersCollection'
yield (yield cucucmbers.takeAll()).toArray()
TomatosResource.initialize()