Class: UomsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- UomsController
- Includes:
- ApplicationHelper
- Defined in:
- app/controllers/uoms_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
#options ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/controllers/uoms_controller.rb', line 8 def query = params[:query] || '' = UnitOfMeasurement .select(:unit_of_measurement_id, :code, :description) .where('description LIKE :query OR code LIKE :query', query: "%#{query}%") .order(:description) .limit(10) render json: { data: } end |