diff --git a/app/controllers/aspects_controller.rb b/app/controllers/aspects_controller.rb index d17ac16f3..1791d4049 100644 --- a/app/controllers/aspects_controller.rb +++ b/app/controllers/aspects_controller.rb @@ -51,7 +51,11 @@ class AspectsController < ApplicationController flash[:error] = e.message end - respond_with :location => aspects_manage_path + if current_user.getting_started + redirect_to :back + else + respond_with :location => aspects_manage_path + end end def show diff --git a/app/controllers/people_controller.rb b/app/controllers/people_controller.rb index e8d6d0932..61d9a43da 100644 --- a/app/controllers/people_controller.rb +++ b/app/controllers/people_controller.rb @@ -68,10 +68,13 @@ class PeopleController < ApplicationController raw_image = params[:person][:profile].delete(:image) params[:profile_image_hash] = { :user_file => raw_image, :to => "all" } - photo = current_user.post(:photo, params[:profile_image_hash]) - params[:person][:profile][:image_url] = photo.url(:thumb_large) - params[:person][:profile][:image_url_medium] = photo.url(:thumb_medium) - params[:person][:profile][:image_url_small] = photo.url(:thumb_small) + photo = current_user.build_post(:photo, params[:profile_image_hash]) + if photo.save! + + params[:person][:profile][:image_url] = photo.url(:thumb_large) + params[:person][:profile][:image_url_medium] = photo.url(:thumb_medium) + params[:person][:profile][:image_url_small] = photo.url(:thumb_small) + end end if current_user.update_profile params[:person][:profile] diff --git a/app/views/users/getting_started/_step_3.html.haml b/app/views/users/getting_started/_step_3.html.haml index e3958325b..3b75a082f 100644 --- a/app/views/users/getting_started/_step_3.html.haml +++ b/app/views/users/getting_started/_step_3.html.haml @@ -15,8 +15,11 @@ %b= service.nickname = link_to t('services.index.disconnect'), service, :confirm => t('services.index.really_disconnect', :service => service.provider), :method => :delete -%h4= link_to t('services.index.connect_to_twitter'), "/auth/twitter" if SERVICES['twitter']['consumer_key']!= "" -%h4= link_to t('services.index.connect_to_facebook'), "/auth/facebook" if SERVICES['facebook']['app_id'] !="" +- unless @services.any?{|x| x.provider == 'twitter'} + %h4= link_to t('services.index.connect_to_twitter'), "/auth/twitter" if SERVICES['twitter']['consumer_key']!= "" + +- unless @services.any?{|x| x.provider == 'facebook'} + %h4= link_to t('services.index.connect_to_facebook'), "/auth/facebook" if SERVICES['facebook']['app_id'] !="" .submit_block = link_to "#{t('users.getting_started.save_and_continue')} →", getting_started_path(:step => 4), :class => "button"