Class: ProvincesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/provinces_controller.rb

Instance Method Summary collapse

Methods included from AuthentificationHelper

#accessible_company_ids_from_tenant_and_user, #application_mode_from_hostname, #current_company_id_from_accessible_company_ids, #current_tenant_from_user, #current_user_and_locale_from_token

Instance Method Details

#indexObject



4
5
6
7
8
9
# File 'app/controllers/provinces_controller.rb', line 4

def index
  provinces = Province.where(
    country_id: params[:country_id]
  ).select(:description, :province_id).order(:description)
  render json: provinces
end