jupiterjs/jquerymx — pull request #77 by dimaf (2011-10-10 00:53:06+00:00)
Title: Allow flexible configuration of simple model definitions

This was done primary to be able to selectively switch on/off fixtures in simple model definition

so you can switch off all fixtures in simple model by setting

$.Model.disableDefaultFixtures=true

and then selectively switch them on, on individual methods by setting

findAll : {fixture:true,src:"GET service/customer"}

here the default fixture names will be used or even by providing a custom fixture name like

findAll : {fixture:"myCustomers.json",src:"GET service/customer"}

You can also just switch fixtures off on individual methods only, without setting $.Model.disableDefaultFixtures

findAll : {fixture:false,src:"GET service/customer"}

also as a side effect you can now pass in any options $.ajax would accept and this will overwrite the default model behavior like

findAll : {src:"service/customer", timeout:"5000",type="POST"}