Class: Gehc::Customer
Instance Method Summary collapse
-
#find_device_by(device_id) ⇒ Object
Find a user device by safely trying a number of approaches.
Methods inherited from User
Methods included from Searchable
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
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 |