|
|
|
@ -54,7 +54,7 @@ class CaseLog < ApplicationRecord
|
|
|
|
|
scope :search_by_id, ->(id) { where(id: id) } |
|
|
|
|
scope :search_by_tenancy_code, ->(code) { where(tenancy_code: code) } |
|
|
|
|
scope :search_by_propcode, ->(code) { where(propcode: code) } |
|
|
|
|
scope :search_by, ->(param) { search_by_id(param.to_i).or(search_by_tenancy_code(param)) } |
|
|
|
|
scope :search_by, ->(param) { search_by_id(param.to_i).or(search_by_tenancy_code(param)).or(search_by_propcode(param)) } |
|
|
|
|
|
|
|
|
|
AUTOGENERATED_FIELDS = %w[id status created_at updated_at discarded_at].freeze |
|
|
|
|
OPTIONAL_FIELDS = %w[first_time_property_let_as_social_housing tenant_code propcode].freeze |
|
|
|
|