basic layout template
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
class Lookup < ApplicationRecord
|
||||
|
||||
|
||||
def available_types
|
||||
{'Employee Roles' => 'employee_roles',
|
||||
'Dining Facilities Status' => 'dining_facilities_status',
|
||||
@@ -12,4 +12,9 @@ class Lookup < ApplicationRecord
|
||||
'Payment Status' => 'payment_status',
|
||||
'Payment Methods' => 'payment_methods'}
|
||||
end
|
||||
|
||||
def self.collection_of(type)
|
||||
Lookup.select("name, value").where("lookup_type" => type ).map { |l| [l.name, l.value] }
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user