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 ⇒ Object
- #find_all ⇒ Object
-
#show ⇒ Object
GET /api/v1/design_tool_fixtures/1.json.
- #show_all ⇒ Object
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 ⇒ Object
9 10 11 |
# File 'app/controllers/api/v1/design_tool_fixtures_controller.rb', line 9 def find render json: DesignToolFixture.where(class_key: params[:name])&.first end |
#find_all ⇒ Object
17 18 19 |
# File 'app/controllers/api/v1/design_tool_fixtures_controller.rb', line 17 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 ⇒ Object
13 14 15 |
# File 'app/controllers/api/v1/design_tool_fixtures_controller.rb', line 13 def show_all render json: DesignToolFixture.all end |