diff options
| author | mo khan <mo@mokhan.ca> | 2014-02-21 20:57:18 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-02-21 20:57:18 -0700 |
| commit | f6eebdeb6aa56c4734102caf1817479d9e7b2765 (patch) | |
| tree | 7b442f97daa5a42c04bd8b944f80d3e06985a981 /app | |
| parent | ea2de48ec543fb341be31e9ed312b72ede860aee (diff) | |
load well statuses and well types with each request to the company licenses controller.
Diffstat (limited to 'app')
| -rw-r--r-- | app/controllers/v1/company_licenses_controller.rb | 6 | ||||
| -rw-r--r-- | app/models/well_type.rb | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/app/controllers/v1/company_licenses_controller.rb b/app/controllers/v1/company_licenses_controller.rb index 234345c..df0c4ec 100644 --- a/app/controllers/v1/company_licenses_controller.rb +++ b/app/controllers/v1/company_licenses_controller.rb @@ -1,5 +1,6 @@ class V1::CompanyLicensesController < ApplicationController before_filter :load_company + before_filter :load_additional_payload_data def index @active_licenses = filter_using(@company, search_filters) @@ -21,4 +22,9 @@ class V1::CompanyLicensesController < ApplicationController def load_company @company = Company.find(params[:company_id]) end + + def load_additional_payload_data + @license_statuses = LicenseStatus::ALL + @well_types = WellType::ALL + end end diff --git a/app/models/well_type.rb b/app/models/well_type.rb new file mode 100644 index 0000000..5367ce2 --- /dev/null +++ b/app/models/well_type.rb @@ -0,0 +1,3 @@ +class WellType + ALL=[] +end |
