before sync
This commit is contained in:
@@ -21,14 +21,37 @@ class Lookup < ApplicationRecord
|
||||
# Lookup.select("value, name").where("lookup_type = ?", lookup_type ).order("name asc").map { |r| [r.name, r.value] }
|
||||
# end
|
||||
|
||||
def self.get_checkin_time_limit
|
||||
time_limit = 5
|
||||
|
||||
lookup = Lookup.find_by_lookup_type('checkin_time_limit')
|
||||
if !lookup.nil?
|
||||
time_limit = lookup.value.to_i
|
||||
end
|
||||
|
||||
return time_limit
|
||||
end
|
||||
|
||||
def self.sync_url
|
||||
url = ""
|
||||
|
||||
lookup = Lookup.find_by_lookup_type('sync_data')
|
||||
return lookup.value
|
||||
if !lookup.nil?
|
||||
url = lookup.value
|
||||
end
|
||||
|
||||
return url
|
||||
end
|
||||
|
||||
def self.get_sync_token
|
||||
token = ""
|
||||
|
||||
lookup = Lookup.find_by_lookup_type('sync_token')
|
||||
return lookup.value
|
||||
if !lookup.nil?
|
||||
token = lookup.value
|
||||
end
|
||||
|
||||
return token
|
||||
end
|
||||
|
||||
def self.collection_of(type)
|
||||
|
||||
Reference in New Issue
Block a user