Class: Gehc::Customer

Inherits:
User
  • Object
show all
Defined in:
lib/models/gehc/customer.rb

Instance Method Summary collapse

Methods inherited from User

#allowed_app_set

Methods included from Searchable

included

Methods included from App47Logger

log_debug, #log_debug, log_error, #log_error, log_exception, log_message, #log_message, #log_warn, log_warn

Methods included from App47EmailSendable

included

Instance Method Details

#find_device_by(device_id) ⇒ Object

Find a user device by safely trying a number of approaches



11
12
13
14
15
# File 'lib/models/gehc/customer.rb', line 11

def find_device_by(device_id)
  suepr || devices.where(serialNumber: device_id).first
rescue StandardError
  nil
end