diff options
Diffstat (limited to 'app/controllers/photos_controller.rb')
-rw-r--r-- | app/controllers/photos_controller.rb | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/app/controllers/photos_controller.rb b/app/controllers/photos_controller.rb index 1f8a37182..52d44732f 100644 --- a/app/controllers/photos_controller.rb +++ b/app/controllers/photos_controller.rb @@ -147,12 +147,7 @@ class PhotosController < ApplicationController current_user.dispatch_post(@photo, to: photo_params[:aspect_ids]) end - if photo_params[:set_profile_photo] - profile_params = {:image_url => @photo.url(:thumb_large), - :image_url_medium => @photo.url(:thumb_medium), - :image_url_small => @photo.url(:thumb_small)} - current_user.update_profile(profile_params) - end + current_user.update_profile(photo: @photo) if photo_params[:set_profile_photo] respond_to do |format| format.json{ render(:layout => false , :json => {"success" => true, "data" => @photo}.to_json )} |