From f1de9c4b8ad3de2b20f46fda9c3f56357ad86994 Mon Sep 17 00:00:00 2001 From: Saurabh Bhatia Date: Tue, 18 Feb 2014 18:34:52 +0800 Subject: [PATCH] Added success param to the response --- app/controllers/api/v1/clients_controller.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/v1/clients_controller.rb b/app/controllers/api/v1/clients_controller.rb index a5e0c8b..3cc1463 100644 --- a/app/controllers/api/v1/clients_controller.rb +++ b/app/controllers/api/v1/clients_controller.rb @@ -4,9 +4,10 @@ module Api respond_to :json def create - respond_with Client.create(client_params) + @client = Client.create(client_params) + respond_with(@client, :success => true) end - + private # Never trust parameters from the scary internet, only allow the white list through.