V1::ForumAnswersController

ForumAnswer resources

show

View an forum_answer

URL

GET /forum_answers/:id

Parâmetros obrigatórios

Nome Tipo Descrição
id Integer

Identifier the forum_answer

Objeto resposta

ForumAnswer

The requested forum_answer

index

View list of all forum_answers

URL

GET /forum_questions/:forum_question_id/forum_answers

Parâmetros obrigatórios

Nome Tipo Descrição
forum_question_id Integer

Identifier of the ForumQuestion object

Objeto resposta

Array<ForumAnswer>

forum_answers List of forum_answers

create

Create an forum_answer

URL

POST /forum_questions/:forum_question_id/forum_answers

Parâmetros obrigatórios

Nome Tipo Descrição
forum_question_id Integer

Identifier of the ForumQuestion object

forum_answer Hash

The forum_answer to create

forum_answer[text] String

The answers's text

Parâmetros opcionais

Nome Tipo Descrição
forum_answer[created_at] DateTime

Creation date. Passing this attribute implies to not run object's callbacks

update

Update an existing forum_answer and redirect to 'show' action

URL

PUT/PATCH /forum_answers/:id

Parâmetros obrigatórios

Nome Tipo Descrição
id Integer

Identifier the forum_answer

forum_answer Hash

The forum_answer to update

forum_answer[text] String

The answers's text

Objeto resposta

ForumAnswer

The created forum_answer or a list of errors

destroy

Destroy an existing forum_answer

URL

DELETE /forum_answers/:id

Parâmetros obrigatórios

Nome Tipo Descrição
id Integer

Identifier the forum_answer