class ProfilePhotosController < ApplicationController
  def create
    photo = ProfilePhoto.create(profile_photo_params)
    render json: photo
  end

private

  def profile_photo_params
    params.require(:profile_photo).permit(:image)
  end
end

class ProfilePhotosController < ApplicationController
  def create
    photo = ProfilePhoto.create(profile_photo_params)
    render text: photo.to_json
  end

private

  def profile_photo_params
    params.require(:profile_photo).permit(:image)
  end
end

Return photo JSON with text MIME type
Return photo JSON with text MIME type

This is a work around for an IE issue. Recent versions of IE treat the
photo JSON returned as a file download, instead of passing it to the
target iframe.

Tested in IE11 against staging environment.
