Skip to content

Instantly share code, notes, and snippets.

@brunohaveroth
Last active June 7, 2016 18:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brunohaveroth/9ff30fb48141c61945305fa9cf7a49d1 to your computer and use it in GitHub Desktop.
Save brunohaveroth/9ff30fb48141c61945305fa9cf7a49d1 to your computer and use it in GitHub Desktop.
findQuery: function(store, type, query) {
var typeModel = '/' + type.toString().split(':')[1];
typeModel = Ember.String.pluralize(typeModel);
typeModel = Ember.String.camelize(typeModel);
var customEndPoint = query.customEndPoint ? '/' + query.customEndPoint : typeModel;
var confirmationsUrl = this.host + customEndPoint;
delete query.customEndPoint;
return this.ajax(confirmationsUrl, 'GET', { data: query });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment