DG MS some fixes for getting started

This commit is contained in:
maxwell 2010-12-04 23:05:47 -08:00
parent 23c446c8bf
commit 0a8af9e72b
3 changed files with 17 additions and 7 deletions

View file

@ -51,8 +51,12 @@ class AspectsController < ApplicationController
flash[:error] = e.message flash[:error] = e.message
end end
if current_user.getting_started
redirect_to :back
else
respond_with :location => aspects_manage_path respond_with :location => aspects_manage_path
end end
end
def show def show
@aspect = current_user.aspect_by_id params[:id] @aspect = current_user.aspect_by_id params[:id]

View file

@ -68,11 +68,14 @@ class PeopleController < ApplicationController
raw_image = params[:person][:profile].delete(:image) raw_image = params[:person][:profile].delete(:image)
params[:profile_image_hash] = { :user_file => raw_image, :to => "all" } params[:profile_image_hash] = { :user_file => raw_image, :to => "all" }
photo = current_user.post(:photo, params[:profile_image_hash]) 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] = photo.url(:thumb_large)
params[:person][:profile][:image_url_medium] = photo.url(:thumb_medium) params[:person][:profile][:image_url_medium] = photo.url(:thumb_medium)
params[:person][:profile][:image_url_small] = photo.url(:thumb_small) params[:person][:profile][:image_url_small] = photo.url(:thumb_small)
end end
end
if current_user.update_profile params[:person][:profile] if current_user.update_profile params[:person][:profile]
flash[:notice] = I18n.t 'people.update.updated' flash[:notice] = I18n.t 'people.update.updated'

View file

@ -15,7 +15,10 @@
%b= service.nickname %b= service.nickname
= link_to t('services.index.disconnect'), service, :confirm => t('services.index.really_disconnect', :service => service.provider), :method => :delete = link_to t('services.index.disconnect'), service, :confirm => t('services.index.really_disconnect', :service => service.provider), :method => :delete
- unless @services.any?{|x| x.provider == 'twitter'}
%h4= link_to t('services.index.connect_to_twitter'), "/auth/twitter" if SERVICES['twitter']['consumer_key']!= "" %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'] !="" %h4= link_to t('services.index.connect_to_facebook'), "/auth/facebook" if SERVICES['facebook']['app_id'] !=""
.submit_block .submit_block