Skip to content

Instantly share code, notes, and snippets.

@Mariusio
Created April 13, 2016 17:35
Show Gist options
  • Save Mariusio/968fe527b76000758828434935d768fb to your computer and use it in GitHub Desktop.
Save Mariusio/968fe527b76000758828434935d768fb to your computer and use it in GitHub Desktop.
// app/controllers/datasources/index.js
// 1
datasources: Ember.computed.sort('model', 'name')
=> Uncaught Error: Assertion Failed: The sort definition for 'datasources' must be a function or an array of strings
// 2
datasources: Ember.computed.sort('model', ['name'])
=> Uncaught Error: Assertion Failed: The key provided to get must be a string, you passed name
// 3
datasourceSorting: ['name'],
datasources: Ember.computed.sort('model', 'datasourceSorting')
=> OK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment