   constructor: (@record) ->
     super
     @model = @record.constructor
-    @url   = getURL(@record)
+    @url   = Ajax.getURL(@record)
   
   find: (params) ->
     @send params

  ajax: -> new Singleton(this)

  url: ->
    base = Ajax.getUrl(@constructor)
    base += "/" unless base.charAt(base.length - 1) is "/"
    base += encodeURIComponent(@id)
    base

class Collection extends Base
  constructor: (@model) -> 
    super
    @url = Ajax.getURL(@model)
    
  findAll: (params) ->
    @send params,
