Class: Api::V1::DesignToolFixturesController
- Inherits:
-
BaseController
- Object
- ActionController::API
- BaseController
- Api::V1::DesignToolFixturesController
show all
- Defined in:
- app/controllers/api/v1/design_tool_fixtures_controller.rb
Instance Method Summary
collapse
#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
6
7
8
|
# File 'app/controllers/api/v1/design_tool_fixtures_controller.rb', line 6
def find
render json: DesignToolFixture.where(class_key: params[:name])&.first
end
|
#find_all ⇒ Object
12
13
14
|
# File 'app/controllers/api/v1/design_tool_fixtures_controller.rb', line 12
def find_all
render json: DesignToolFixture.where(class_key: params[:names].split(','))
end
|
#show ⇒ Object
GET /api/v1/design_tool_fixtures/1.json
3
4
5
|
# File 'app/controllers/api/v1/design_tool_fixtures_controller.rb', line 3
def show
render json: DesignToolFixture.find(params[:id])
end
|
#show_all ⇒ Object
9
10
11
|
# File 'app/controllers/api/v1/design_tool_fixtures_controller.rb', line 9
def show_all
render json: DesignToolFixture.all
end
|