From f338593bee33645cf874a0120dcf8332e00f2066 Mon Sep 17 00:00:00 2001 From: Saurabh Bhatia Date: Wed, 19 Feb 2014 16:01:42 +0800 Subject: [PATCH] Added success status with json --- app/controllers/api/v1/clients_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/v1/clients_controller.rb b/app/controllers/api/v1/clients_controller.rb index 72644d9..a96c192 100644 --- a/app/controllers/api/v1/clients_controller.rb +++ b/app/controllers/api/v1/clients_controller.rb @@ -6,7 +6,7 @@ module Api def create @client = Client.new(client_params) if @client.save - render :json => @client + render :json => { :success => true, :user => @client.to_json } else render :json => { :errors => @client.errors.full_messages , :status => 422}.to_json end