Class: StaffDevice

Inherits:
ApplicationRecord show all
Defined in:
app/models/staff_device.rb

Overview

typed: ignore

Instance Method Summary collapse

Methods inherited from ApplicationRecord

sync_carrierwave_url

Instance Method Details

#storeObject



8
9
10
11
12
13
14
15
16
# File 'app/models/staff_device.rb', line 8

def store
  if save
    true
  elsif errors.has_key?(:token) && StaffDevice.find_by(token: token).exist?
    true
  else
    false
  end
end