X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/30ede5f10b09a363bf71d722c08d39ca2bc4c30f..7a01e44e4a48e2dd9d677ed9cf61f059b0d4c718:/app/controllers/application_controller.rb diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index d3427160cb..a1b167035e 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -56,7 +56,7 @@ class ApplicationController < ActionController::Base current_user.uuid, current_user.uuid) if params[:where] where = params[:where] - where = Oj.load(where) if where.is_a?(String) + where = MultiJson.load(where) if where.is_a?(String) conditions = ['1=1'] where.each do |attr,value| if (!value.nil? and @@ -98,7 +98,7 @@ class ApplicationController < ActionController::Base raise "no #{resource_name} (or #{resource_name.camelcase(:lower)}) provided with request #{params.inspect}" end if @attrs.class == String - @attrs = uncamelcase_hash_keys(Oj.load @attrs) + @attrs = uncamelcase_hash_keys(MultiJson.load @attrs) end @object = model_class.new @attrs @object.save @@ -108,7 +108,7 @@ class ApplicationController < ActionController::Base def update @attrs = params[resource_name] if @attrs.is_a? String - @attrs = uncamelcase_hash_keys(Oj.load @attrs) + @attrs = uncamelcase_hash_keys(MultiJson.load @attrs) end @object.update_attributes @attrs show @@ -191,7 +191,7 @@ class ApplicationController < ActionController::Base def accept_attribute_as_json(attr, force_class) if params[resource_name].is_a? Hash if params[resource_name][attr].is_a? String - params[resource_name][attr] = Oj.load params[resource_name][attr] + params[resource_name][attr] = MultiJson.load params[resource_name][attr] if force_class and !params[resource_name][attr].is_a? force_class raise TypeError.new("#{resource_name}[#{attr.to_s}] must be a #{force_class.to_s}") end