method api.ready can take one more argument : 'priority'
It's difficult to organize javascript code with big mvc application, so you can execute code with different priority along your differents views, for example :

head.ready(function() {
    console.log("to do last");
},10);
head.ready(function() {
    console.log("to do first");
},-1);