app/assets/javascripts/joosy/core/joosy.js.coffee in joosy-1.0.0.RC4 vs app/assets/javascripts/joosy/core/joosy.js.coffee in joosy-1.0.0.RC5
- old
+ new
@@ -6,16 +6,16 @@
@Joosy =
#
# Core modules container
#
Modules: {}
-
+
#
# Resources container
#
Resource: {}
-
+
#
# Templaters container
#
Templaters: {}
@@ -23,11 +23,11 @@
# Registeres anything inside specified namespace (objects chain starting from `window`)
#
# @example Basic usage
# Joosy.namespace 'foobar', ->
# class @RealThing
- #
+ #
# foo = new foobar.RealThing
#
# @param [String] name Namespace keyword
# @param [Boolean] generator Namespace content
#
@@ -171,9 +171,11 @@
unless space[className]
Joosy.Modules.Log.debugAs space, "Define #{className}"
space[className] = class extends Joosy.Resource.REST
@entity resource
@source path
+ __collection: ->
+ space[collectionName]
unless space[collectionName]
Joosy.Modules.Log.debugAs space, "Define #{collectionName}"
space[collectionName] = class extends Joosy.Resource.RESTCollection
@model space[className]