Class: Api::V1::DesignToolFixturesController
- Inherits:
-
BaseController
- Object
- ActionController::API
- BaseController
- Api::V1::DesignToolFixturesController
- Defined in:
- app/controllers/api/v1/design_tool_fixtures_controller.rb
Overview
Controller: design tool fixtures.
Instance Method Summary collapse
-
#find ⇒ void
GET /api/v1/design_tool_fixtures/find — the single fixture matching the
nameparam'sclass_key. -
#find_all ⇒ void
GET /api/v1/design_tool_fixtures/find_all — fixtures matching the comma-separated
namesparam'sclass_keys. -
#show ⇒ Object
GET /api/v1/design_tool_fixtures/1.json.
-
#show_all ⇒ void
GET /api/v1/design_tool_fixtures/show_all — every fixture.
Methods inherited from BaseController
#catalog_for_request, #error!, #locale_for_request, #logger, #render_bad_request_response, #render_internal_server_error, #render_not_found_response, #render_result, #render_unprocessable_entity_response, #set_locale, #store_for_request, #underscore_params
Instance Method Details
#find ⇒ void
This method returns an undefined value.
GET /api/v1/design_tool_fixtures/find — the single fixture matching the
name param's class_key.
13 14 15 |
# File 'app/controllers/api/v1/design_tool_fixtures_controller.rb', line 13 def find render json: DesignToolFixture.where(class_key: params[:name])&.first end |
#find_all ⇒ void
This method returns an undefined value.
GET /api/v1/design_tool_fixtures/find_all — fixtures matching the
comma-separated names param's class_keys.
28 29 30 |
# File 'app/controllers/api/v1/design_tool_fixtures_controller.rb', line 28 def find_all render json: DesignToolFixture.where(class_key: params[:names].split(',')) end |
#show ⇒ Object
GET /api/v1/design_tool_fixtures/1.json
5 6 7 |
# File 'app/controllers/api/v1/design_tool_fixtures_controller.rb', line 5 def show render json: DesignToolFixture.find(params[:id]) end |
#show_all ⇒ void
This method returns an undefined value.
GET /api/v1/design_tool_fixtures/show_all — every fixture.
20 21 22 |
# File 'app/controllers/api/v1/design_tool_fixtures_controller.rb', line 20 def show_all render json: DesignToolFixture.all end |