Skip to content

Commit

Permalink
Make the RESTAdapter work on the phone in Phonegap
Browse files Browse the repository at this point in the history
  • Loading branch information
mlandauer committed Oct 16, 2013
1 parent 5d61fe6 commit 2b92be5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion www/js/application.js
@@ -1,3 +1,8 @@
window.App = Ember.Application.create();

App.ApplicationAdapter = DS.RESTAdapter.extend();
App.ApplicationAdapter = DS.RESTAdapter.extend({
namespace: function() {
// Use the current directory as the namespace
return window.location.pathname.split("/").slice(1,-1).join("/");
}.property()
});

0 comments on commit 2b92be5

Please sign in to comment.