Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions app/lib/alloy/sync/book_rest.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ module.exports.sync = function(method, model, options) {

var payload = model.toJSON();
var error;


if(typeof(model.config.adapter.base_url) != 'undefined'){
BASE_URL = model.config.adapter.base_url;
// this enables other models using the same adapter to work, otherwise the BASE_URL variable persists
}
switch(method) {

// This case is called by the Model.fetch and Collection.fetch methods to retrieve data.
Expand Down Expand Up @@ -115,4 +119,4 @@ module.exports.beforeModelCreate = function(config, name) {
// Perform some actions after creating the Model class
module.exports.afterModelCreate = function(Model, name) {
// Nothing to do
};
};