summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/controllers/v1/company_licenses_controller.rb2
-rw-r--r--app/models/license_status.rb5
2 files changed, 6 insertions, 1 deletions
diff --git a/app/controllers/v1/company_licenses_controller.rb b/app/controllers/v1/company_licenses_controller.rb
index 32e3bc1..234345c 100644
--- a/app/controllers/v1/company_licenses_controller.rb
+++ b/app/controllers/v1/company_licenses_controller.rb
@@ -9,7 +9,7 @@ class V1::CompanyLicensesController < ApplicationController
private
def search_filters
- { status: LicenseStatus::ACTIVE, township: params[:township] }
+ { status: LicenseStatus.find_match(params[:status]), township: params[:township] }
end
def filter_using(scope, filters)
diff --git a/app/models/license_status.rb b/app/models/license_status.rb
index abe54b1..e22a71c 100644
--- a/app/models/license_status.rb
+++ b/app/models/license_status.rb
@@ -1,3 +1,8 @@
module LicenseStatus
ACTIVE="active"
+ ALL=[ACTIVE]
+
+ def self.find_match(status)
+ ACTIVE
+ end
end