diff --git a/app/models/user.rb b/app/models/user.rb index b57131607c14d4e156c44aeec789272b2de90c13..b5496f47d04889e1cfb023908fcb414eed80b5d3 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -304,7 +304,7 @@ class User def update_profile(params) if params[:photo] params[:photo].update_attributes(:pending => false) if params[:photo].pending - params[:image_url] = params[:photo].url + params[:image_url] = params[:photo].url(:thumb_large) params[:image_url_medium] = params[:photo].url(:thumb_medium) params[:image_url_small] = params[:photo].url(:thumb_small) end diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 1e43efc2a643cca13be878dcdbebd4dfcc6b5bea..1af1454ab8e6c3400ad6bfeb888e9fdf89ec6566 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -296,7 +296,7 @@ describe User do end it 'updates image_url' do user.update_profile(@params).should be_true - user.reload.profile.image_url.should == @photo.absolute_url + user.reload.profile.image_url.should == @photo.absolute_url(:thumb_large) user.profile.image_url_medium.should == @photo.absolute_url(:thumb_medium) user.profile.image_url_small.should == @photo.absolute_url(:thumb_small) end