Skip to content

Commit

Permalink
still working on amazons3 populateimages3 task
Browse files Browse the repository at this point in the history
  • Loading branch information
Neil Gehani committed Dec 11, 2013
1 parent 1930c4d commit 22882be
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/tasks/populateimages3.rake
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ namespace :db do
User.all.each do |user|
puts "[DEBUG] uploading images for user #{user.id} of #{User.last.id}"
10.times do |n|
image = image_remote_url('http://s3.amazonaws.com/event_sample_images').sample
description = %w(cool awesome crazy wow adorbs incredible).sample
user.pins.create!(image: image, description: description)
image = user.pins.create!(image_remote_url: 'http://s3.amazonaws.com/event_sample_images'.sample, description: %w(cool awesome crazy wow adorbs incredible).sample
#image = image_remote_url('http://s3.amazonaws.com/event_sample_images').sample
#description = %w(cool awesome crazy wow adorbs incredible).sample
#user.pins.create!(image: image, description: description)
end
end
end
Expand Down

0 comments on commit 22882be

Please sign in to comment.