Browse Source

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.
olivergrahl 8 years ago
parent
commit
54f3e2064c
1 changed files with 6 additions and 1 deletions
  1. 6 1
      app/controllers/form_controller.rb

+ 6 - 1
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