trying to redeploy to get photos working

This commit is contained in:
ilya 2010-08-24 15:23:58 -07:00
parent 19e2c8f898
commit 82d140aa80

View file

@ -63,11 +63,18 @@ def warzombie
backer_number = YAML.load_file(Rails.root.join('config','backer_number.yml'))[:seed_number].to_i
username = backer_info[backer_number]['username'].gsub(/ /,'').downcase
@fixture_name = File.dirname(__FILE__) + "../../../public/images/users/#{username}.jpg"
photo = current_user.post(:photo, :album_id => album.id,
:user_file => "")
current_user.update_profile(:image_url => photo.url)
@fixture_name = File.dirname(__FILE__) + "/../../public/images/user/#{username}.jpg"
photo = Photo.new(:person => current_user.person, :album => album)
photo.image.store! File.open(@fixture_name)
photo.save
photo.reload
current_user.raw_visible_posts << photo
current_user.save
current_user.update_profile(:image_url => photo.url(:thumb_medium))
current_user.save
end
end