def respond_with_json(object, options = {})
      respond_to do |format|
        format.json do
          render options.merge(json: object)
        end
      end
    end
def respond_with_json(object, options = {})
      respond_to do |format|
        format.json do
          render options.merge(json: object)
        end
      end
    end
Public: A quick helper to create a respond_to block for
 returning json to the client. Used because `respond_with`
 is no longer included in Rails.