finished CRM and customer

This commit is contained in:
Aung Myo
2017-06-12 14:23:20 +06:30
parent 0943808ac8
commit e90178cfdc
13 changed files with 121 additions and 62 deletions

View File

@@ -17,6 +17,10 @@ class Lookup < ApplicationRecord
"Gateway Communication Type" => "gateway_communication_type"}
end
# def self.get_by_type( lookup_type)
# Lookup.select("value, name").where("lookup_type = ?", lookup_type ).order("name asc").map { |r| [r.name, r.value] }
# end
def self.collection_of(type)
Lookup.select("name, value").where("lookup_type" => type ).map { |l| [l.name, l.value] }