From 074be1be38b7c71210b5a7a2dfb6319449aa57fb Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Fri, 4 Jan 2013 18:17:37 -0800 Subject: [PATCH] un-serialize data passed by google api client --- app/controllers/orvos/v1/collections_controller.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/controllers/orvos/v1/collections_controller.rb b/app/controllers/orvos/v1/collections_controller.rb index 3a47d14c22..ccdf384303 100644 --- a/app/controllers/orvos/v1/collections_controller.rb +++ b/app/controllers/orvos/v1/collections_controller.rb @@ -47,7 +47,11 @@ class Orvos::V1::CollectionsController < ApplicationController # POST /collections # POST /collections.json def create - @collection = Collection.new(params[:collection]) + if params[:collection].class == String + @collection = Collection.new(JSON.parse(params[:collection])) + else + @collection = Collection.new(params[:collection]) + end respond_to do |format| if @collection.save -- 2.30.2