Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : How to override findOne correctly

$
0
0
@Cherif: I'm not sure that's what he's looking for. setTimeout would delay the request a Model would make and wouldn't affect the timeout at all.

By "tune timeout" do you mean how do you change the timeout of a findOne, findAll, etc?

If so, you just did it yourself a few posts ago. One of the properties that $.ajax (can.ajax) accepts is a timeout. You would have to override the model functions to always pass this parameter instead of relying on the default. You could do this to every model and specifiy different timeouts or create a Base Model that will take timeout from the params you pass to the function (like id in your findOne example)

Viewing all articles
Browse latest Browse all 3491

Trending Articles