pass_server.rb
# Check if a device is already registered
Check if a device is already registered
Check if a device is already registered
def device_has_any_registrations?(device_id)
    registration_count = self.registrations.where(:device_id => device_id).count
    if registration_count > 0
      return true
    else
      return false
    end
  end
def device_has_any_registrations? ( device_id ) registration_count = self . registrations . where ( :device_id => device_id ) . count if registration_count > 0 return true else return false end end
Check if a device is already registered
Check if a device is already registered
device_id
<not_specific>