Class: Okei::Api::V1::UnitsController
- Inherits:
-
ResponderController
- Object
- ApplicationController
- ResponderController
- Okei::Api::V1::UnitsController
- Defined in:
- app/controllers/okei/api/v1/units_controller.rb
Overview
Controller for getting units
Instance Method Summary collapse
-
#index ⇒ Object
Returns either all units of measure or units of given measure.
-
#search ⇒ Object
Finds a unit of measure by text.
-
#show ⇒ Object
Finds a unit of measure by uuid.
Methods inherited from ResponderController
#on_found, #on_not_found, #on_success
Instance Method Details
#index ⇒ Object
Returns either all units of measure or units of given measure.
15 16 17 |
# File 'app/controllers/okei/api/v1/units_controller.rb', line 15 def index run_case GetUnits, with: :measure end |
#search ⇒ Object
Finds a unit of measure by text
25 26 27 |
# File 'app/controllers/okei/api/v1/units_controller.rb', line 25 def search run_case FindUnit, with: :text end |
#show ⇒ Object
Finds a unit of measure by uuid.
20 21 22 |
# File 'app/controllers/okei/api/v1/units_controller.rb', line 20 def show run_case GetUnit, with: :uuid end |