     @loadingMore = false
     @loadingPrevious = false
     @collection   = opts.collection
-    @params       = _.merge({from: 0, per: 25, order: 'id'}, opts.params)
+    @params       = merge({from: 0, per: 25, order: 'id'}, opts.params)
     @path         = opts.path
     @numLoaded    = opts.numLoaded or 0
     @numRequested = opts.numRequested or @params['per']

import Records from '@/shared/services/records'

export default class RecordLoader
  constructor: (opts = {}) ->


  fetchRecords: (opts = {}) ->
    @loading = true
    Records[camelCase(@collection)].fetch
      path:   @path
      params: defaults({}, opts, @params)
    .then (data) =>
      records = data[@collection] || []
      @numLoaded += records.length
