mirror of
https://github.com/kbparagua/paloma
synced 2023-03-27 23:21:17 -04:00
do not put request data on params
This commit is contained in:
parent
9221b07d38
commit
6d9e22e85f
2 changed files with 8 additions and 10 deletions
|
@ -32,13 +32,14 @@ describe('Paloma.ControllerBuilder', function(){
|
||||||
});
|
});
|
||||||
|
|
||||||
it("initializes controller instance's params", function(){
|
it("initializes controller instance's params", function(){
|
||||||
var expectedParams = {_controller: 'Test', _action: 'show', a: 1, b: 2};
|
var expectedParams = {a: 1, b: 2};
|
||||||
var correct = true;
|
var correct = true;
|
||||||
|
|
||||||
for (var k in expectedParams){
|
for (var k in expectedParams)
|
||||||
if (controller.params[k] != expectedParams[k])
|
if (controller.params[k] != expectedParams[k]) correct = false;
|
||||||
correct = false;
|
|
||||||
}
|
for (var k in controller.params)
|
||||||
|
if (expectedParams[k] != controller.params[k]) correct = false;
|
||||||
|
|
||||||
expect(correct).toBeTruthy();
|
expect(correct).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
|
@ -19,10 +19,7 @@ Paloma.ControllerBuilder.prototype = {
|
||||||
},
|
},
|
||||||
|
|
||||||
_buildParams: function(){
|
_buildParams: function(){
|
||||||
var params = {
|
var params = {};
|
||||||
_controller: this.options.controller,
|
|
||||||
_action: this.options.action
|
|
||||||
};
|
|
||||||
|
|
||||||
for (var k in this.options.params)
|
for (var k in this.options.params)
|
||||||
if (this.options.params.hasOwnProperty(k))
|
if (this.options.params.hasOwnProperty(k))
|
||||||
|
|
Loading…
Reference in a new issue