blob: 963423a084e934184fe1f9d965522bc5b159910e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
class V1::CompanyLicensesController < ApplicationController
before_filter :load_company
def index
@active_licenses = @company.status(LicenseStatus::ACTIVE)
@active_licenses = @active_licenses.township(params[:township]) if params[:township].present?
render json: @active_licenses
end
private
def load_company
@company = Company.find(params[:company_id])
end
end
|