documentcloud/backbone — comment on commit 6b3ff7b0359510917d9ead8c8e16a7457eef05ef
File: backbone.js line 465
By sstephenson:

We use it in Basecamp Mobile to change the sort behavior on a collection based on where it's being used:

```coffee

module.exports = class Projects extends Collection
model: Project

initialize: (models, {@recent}) ->
@url = if @recent
"/api/v3/projects/recent"
else
"/api/v3/projects?status=active"

# ...

comparator: (project) =>
if @recent
-Date.parse project.lastAccessedOn
else
project.name
```

Perhaps that's not the best way to do it, though (we could also use inheritance).