In JMVC I used to do this:
- can.Model("Thing", {
- findAll : function(params, success, error) {
- return can.ajax({
- url: '/things',
- type: 'get',
- dataType: 'json thing.models',
- data: params,
- success: success,
- error: error
- });
- }
- }, {});
Is this still necessary in CanJS?
It seems to be giving me errors.
Uncaught fixtures.js Error parsererror Error: No conversion from json to thing.models
This is with fixtures turned on.
With fixtures turned off I get the following error:
Uncaught TypeError: Function.prototype.apply: Arguments list has wrong type
If I removed the converter line in bold above (thing.models), it seems to work fine. Trying to remember why I have it there.
Thanks,
Mike