Sha256: 780953b9d4dd063539ae2ef69d6b10cf29ae5f9ee04c1c85bebeecce6ed853d5

Contents?: true

Size: 551 Bytes

Versions: 1

Compression:

Stored size: 551 Bytes

Contents

module DeviseOnesignal
    module DeviceHelper

        def current_device
            if cookies[:oneSignalPlayerId].nil?
                device = Device.new
                device.onesignal_permission = cookies[:oneSignalPlayerPermission]
                device.owner = ApplicationController.set_device_owner || set_device_owner
                device.last_used = Time.now
            else
                device = Device.find_by onesignal_id: cookies[:oneSignalPlayerId]
            end
            device
        end

    end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
devise-onesignal-3.0.1 lib/devise-onesignal/device_helper.rb