Browse files

Exposed models again for extension purposes.

  • Loading branch information...
1 parent 0e24546 commit ef4b90a13bf14b3c94c3c861f0cd84aaf3b953ed Brandon R. Stoner committed Jun 21, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/bone.coffee
View
8 src/bone.coffee
@@ -2,6 +2,7 @@ window.TastyBone = {}
TastyBone = window.TastyBone
class Bone
+ models: {}
collections: {}
constructor: (@original_url, options) ->
@@ -18,10 +19,11 @@ class Bone
capitalizedName = name[0].toUpperCase() + name.slice(1)
model = TastyBone.Model.factory endpoint.list_endpoint, @
- next_collection = TastyBone.Collection.factory model,
- endpoint.list_endpoint
+ collection = TastyBone.Collection.factory model,
+ endpoint.list_endpoint
- @collections[capitalizedName + 'Collection'] = next_collection
+ @models[capitalizedName + 'Model'] = model
+ @collections[capitalizedName + 'Collection'] = _collection
@.trigger 'ready', @

0 comments on commit ef4b90a

Please sign in to comment.