Skip to content

Commit

Permalink
feat(url): Url now supports unescaped suffix
Browse files Browse the repository at this point in the history
Fixes #45
  • Loading branch information
mgonto committed May 3, 2013
1 parent 07b78a2 commit 0350bcd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions dist/restangular.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ module.provider('Restangular', function() {
}

BaseCreator.prototype.resource = function(current, $resource, headers) {
var reqParams = suffix ? {restangularSuffix: suffix} : {};
return $resource(this.base(current) + "/:" + restangularFields.what + ":restangularSuffix" , {}, {
var reqParams = {};
return $resource(this.base(current) + "/:" + restangularFields.what + (suffix || '') , {}, {
getList: {method: 'GET', params: reqParams, isArray: listTypeIsArray, headers: headers || {}},
get: {method: 'GET', params: reqParams, isArray: false, headers: headers || {}},
put: {method: 'PUT', params: reqParams, isArray: false, headers: headers || {}},
Expand Down
2 changes: 1 addition & 1 deletion dist/restangular.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified dist/restangular.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions src/restangular.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ module.provider('Restangular', function() {
}

BaseCreator.prototype.resource = function(current, $resource, headers) {
var reqParams = suffix ? {restangularSuffix: suffix} : {};
return $resource(this.base(current) + "/:" + restangularFields.what + ":restangularSuffix" , {}, {
var reqParams = {};
return $resource(this.base(current) + "/:" + restangularFields.what + (suffix || '') , {}, {
getList: {method: 'GET', params: reqParams, isArray: listTypeIsArray, headers: headers || {}},
get: {method: 'GET', params: reqParams, isArray: false, headers: headers || {}},
put: {method: 'PUT', params: reqParams, isArray: false, headers: headers || {}},
Expand Down

0 comments on commit 0350bcd

Please sign in to comment.