     else if model instanceof Backbone.RailsCollection
       return model.model.prototype.railsClass
     else
-      if not model.prototype.railsClass
+      unless model.prototype.railsClass
         if model.prototype.model or not model.prototype.model.prototype.railsClass
           return  model.prototype.model.prototype.railsClass
         throw "Invalid model #{model}"

    if @hasMany[attr]
      opts = @hasMany[attr]
      opts.subset = {} unless opts.subset
      if not opts.subset[@cid]
        if options.remoteRefresh
          remoteRefresh = true
        else

    if @hasOne[attr]
      @_hasOneCache = {} unless @_hasOneCache
      @_hasOneCache[@cid] = {col: null, ids: []} unless @_hasOneCache[@cid]
      unless @_hasOneCache[@cid].col
        if options.remoteRefresh
          remoteRefresh = true
        else
