vendor/assets/javascripts/devise-onesignal.js.erb in devise-onesignal-1.2.1 vs vendor/assets/javascripts/devise-onesignal.js.erb in devise-onesignal-2.0.0
- old
+ new
@@ -6,21 +6,21 @@
function OneSignalInit() {
// Do NOT call init() twice
OneSignal.push([ 'init', {
// Your other init options here
- appId: '<%= DeviseOneSignal::Configuration.app_id %>',
- autoRegister: <%= DeviseOneSignal::Configuration.auto_register ? 'true' : 'false' %>,
+ appId: '<%= DeviseOnesignal.configuration.app_id %>',
+ autoRegister: <%= DeviseOnesignal.configuration.auto_register ? 'true' : 'false' %>,
welcomeNotification: {
disable: true,
title: '',
message: ''
},
notifyButton: {
enable: false
},
- persistNotification: <%= DeviseOneSignal::Configuration.persist_notification ? 'true' : 'false' %> // Automatically dismiss the notification after ~20 seconds in Chrome Desktop v47+
+ persistNotification: <%= DeviseOnesignal.configuration.persist_notification ? 'true' : 'false' %> // Automatically dismiss the notification after ~20 seconds in Chrome Desktop v47+
}]);
// Firstly this will check user id
OneSignal.push(function() {
OneSignal.getUserId().then(function(userId) {
@@ -41,10 +41,10 @@
function OneSignalSubscribe() {
if ( useragentid != null ) {
OneSignal.setSubscription(true);
} else {
OneSignal.registerForPushNotifications({
- modalPrompt: <%= DeviseOneSignal::Configuration.subscribe_with_modal ? 'true' : 'false' %>
+ modalPrompt: <%= DeviseOnesignal.configuration.subscribe_with_modal ? 'true' : 'false' %>
});
};
}
function OneSignalUnsubscribe() {