1
0
Fork 0
mirror of https://github.com/kbparagua/paloma synced 2023-03-27 23:21:17 -04:00

Moving document.ready to init.js in the header fixes the turbolinks issues #40

This commit is contained in:
fbiete@gmail.com 2014-06-20 10:16:30 +02:00
parent a0ed76fc98
commit 97d74af4e9
2 changed files with 16 additions and 4 deletions

View file

@ -4,8 +4,10 @@
<script type="text/javascript">
(function(){
// Do not continue if Paloma not found.
if (window['Paloma'] === undefined && window['console'] !== undefined){
console.warn("Paloma not found. Require it in your application.js.");
if (window['Paloma'] === undefined) {
if (window['console'] !== undefined) {
console.warn("Paloma not found. Require it in your application.js.");
}
return true;
}
@ -20,8 +22,6 @@
request['resource'],
request['action'],
request['params']);
$(document).ready(function(){ Paloma.engine.start(); });
})();
</script>
</div>

View file

@ -15,3 +15,15 @@ else {
console.log(msg);
};
}
$(document).ready(function(){
// Do not continue if Paloma not found.
if (window['Paloma'] === undefined) {
if (window['console'] !== undefined) {
console.warn("Paloma not found. Require it in your application.js.");
}
return true;
}
Paloma.engine.start();
});