sync lookup type
This commit is contained in:
@@ -21,6 +21,11 @@ class Lookup < ApplicationRecord
|
||||
# Lookup.select("value, name").where("lookup_type = ?", lookup_type ).order("name asc").map { |r| [r.name, r.value] }
|
||||
# end
|
||||
|
||||
def self.sync_url
|
||||
lookup = Lookup.find_by_lookup_type('sync_data')
|
||||
return lookup.value
|
||||
end
|
||||
|
||||
def self.collection_of(type)
|
||||
Lookup.select("name, value").where("lookup_type" => type ).map { |l| [l.name, l.value] }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user