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

Merge pull request #57 from fmbiete/turbolinks

Moving document.ready to init.js, to be in html header
This commit is contained in:
Karl Bryan Paragua 2014-09-25 23:02:36 +08:00
commit 6968003fed
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();
});