Skip to content

Commit

Permalink
Merge branch 'master' of github.com:truenorth/ember-api-actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike North committed Jul 7, 2015
2 parents a4174db + 17c0d97 commit e49cfca
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion addon/utils/build-url.js
Expand Up @@ -6,5 +6,10 @@ export default function buildOperationUrl(record, opPath, requestType, intance=t
let adapter = record.store.adapterFor(modelName);
let path = opPath;
let baseUrl = adapter.buildURL(modelName, intance ? record.get('id') : null, requestType);
return `${baseUrl}/${path}`;

if (baseUrl.charAt(baseUrl.length-1) === '/') {
return `${baseUrl}${path}`;
} else {
return `${baseUrl}/${path}`;
}
}

0 comments on commit e49cfca

Please sign in to comment.