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:
parent
a0ed76fc98
commit
97d74af4e9
2 changed files with 16 additions and 4 deletions
|
@ -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>
|
||||
|
|
12
vendor/assets/javascripts/paloma/init.js
vendored
12
vendor/assets/javascripts/paloma/init.js
vendored
|
@ -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();
|
||||
});
|
Loading…
Reference in a new issue