From 54f3e2064c174fbe3568adcfb70d1b6c0243e3a2 Mon Sep 17 00:00:00 2001 From: olivergrahl Date: Mon, 9 Jan 2017 13:45:22 +0100 Subject: [PATCH] Return ticket data on form submission (#584) Form controller will return ticket id and number on success, so this data can be displayed on the calling page. --- app/controllers/form_controller.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/controllers/form_controller.rb b/app/controllers/form_controller.rb index ea7ff5d01..714bcf6f8 100644 --- a/app/controllers/form_controller.rb +++ b/app/controllers/form_controller.rb @@ -112,7 +112,12 @@ class FormController < ApplicationController UserInfo.current_user_id = 1 - result = {} + result = { + ticket: { + id: ticket.id, + number: ticket.number + } + } render json: result, status: :ok end