Permalink
Browse files

fixed seed file to include images, but you might need to run rake from

the root of the project for it to work
  • Loading branch information...
1 parent e895a99 commit 3d5ade7f8755edef69109c06b7d703452e9359ad @alexhocksween alexhocksween committed Dec 11, 2011
Showing with 16 additions and 14 deletions.
  1. +3 −1 .gitignore
  2. +13 −13 db/seeds.rb
View
4 .gitignore
@@ -3,8 +3,10 @@
db/*.sqlite3
log/*.log
tmp/
+*.swp
+config/omniauth.rb
.sass-cache/
config/database.yml
public/uploads/
config/facebook_authentication.yml
-config/initializers/omniauth.rb
+config/initializers/omniauth.rb
View
26 db/seeds.rb
@@ -16,16 +16,16 @@
@user = User.create(:name => 'Francis Real', :provider => 'facebook', :uid => "1217100528", :email => 'ttt.test@phoreal.tutaktran.com')
# Has data, but doesn't load photos
-Offer.create(:photo => 'IMG_0704.jpg', :pickup_point => 'La Ruche, Paris', :user => @user, :category_id => 4, :title => 'Lamp', :description => 'Nunc tempor diam vehicula mauris.')
-Offer.create(:photo => 'IMG_0705.jpg', :pickup_point => 'La Ruche, Paris', :user => @user, :category_id => 4, :title => 'Green plant', :description => 'Nunc tempor diam vehicula mauris.')
-Offer.create(:photo => 'IMG_0706.jpg', :pickup_point => 'La Ruche, Paris', :user => @user, :category_id => 5, :title => 'Pens', :description => 'Nunc tempor diam vehicula mauris.')
-Offer.create(:photo => 'IMG_0707.jpg', :pickup_point => 'La Ruche, Paris', :user => @user, :category_id => 2, :title => 'Water flask', :description => 'Nunc tempor diam vehicula mauris.')
-Offer.create(:photo => 'IMG_0708.jpg', :pickup_point => 'La Ruche, Paris', :user => @user, :category_id => 5, :title => 'Barrel', :description => 'Nunc tempor diam vehicula mauris.')
-Offer.create(:photo => 'IMG_0709.jpg', :pickup_point => 'La Ruche, Paris', :user => @user, :category_id => 4, :title => 'Water jar', :description => 'Nunc tempor diam vehicula mauris.')
-Offer.create(:photo => 'IMG_0710.jpg', :pickup_point => 'La Ruche, Paris', :user => @user, :category_id => 4, :title => 'Stool', :description => 'Nunc tempor diam vehicula mauris.')
-Offer.create(:photo => 'IMG_0711.jpg', :pickup_point => 'La Ruche, Paris', :user => @user, :category_id => 4, :title => 'Teapot', :description => 'Nunc tempor diam vehicula mauris.')
-Offer.create(:photo => 'IMG_0712.jpg', :pickup_point => 'La Ruche, Paris', :user => @user, :category_id => 2, :title => 'SLR', :description => 'Nunc tempor diam vehicula mauris.')
-Offer.create(:photo => 'IMG_0713.jpg', :pickup_point => 'La Ruche, Paris', :user => @user, :category_id => 4, :title => 'Water jar', :description => 'Nunc tempor diam vehicula mauris.')
-Offer.create(:photo => 'IMG_0714.jpg', :pickup_point => 'La Ruche, Paris', :user => @user, :category_id => 4, :title => 'Wine glasses', :description => 'Nunc tempor diam vehicula mauris.')
-Offer.create(:photo => 'IMG_0715.jpg', :pickup_point => 'La Ruche, Paris', :user => @user, :category_id => 4, :title => 'Bottle lids', :description => 'Nunc tempor diam vehicula mauris.')
-Offer.create(:photo => 'IMG_0716.jpg', :pickup_point => 'La Ruche, Paris', :user => @user, :category_id => 5, :title => 'Box', :description => 'Nunc tempor diam vehicula mauris.')
+Offer.create(:photo => File.open('public/seed_images/IMG_0704.jpg'), :pickup_point => 'La Ruche, Paris', :user => @user, :category_id => 4, :title => 'Lamp', :description => 'Nunc tempor diam vehicula mauris.')
+Offer.create(:photo => File.open('public/seed_images/IMG_0705.jpg'), :pickup_point => 'La Ruche, Paris', :user => @user, :category_id => 4, :title => 'Green plant', :description => 'Nunc tempor diam vehicula mauris.')
+Offer.create(:photo => File.open('public/seed_images/IMG_0706.jpg'), :pickup_point => 'La Ruche, Paris', :user => @user, :category_id => 5, :title => 'Pens', :description => 'Nunc tempor diam vehicula mauris.')
+Offer.create(:photo => File.open('public/seed_images/IMG_0707.jpg'), :pickup_point => 'La Ruche, Paris', :user => @user, :category_id => 2, :title => 'Water flask', :description => 'Nunc tempor diam vehicula mauris.')
+Offer.create(:photo => File.open('public/seed_images/IMG_0708.jpg'), :pickup_point => 'La Ruche, Paris', :user => @user, :category_id => 5, :title => 'Barrel', :description => 'Nunc tempor diam vehicula mauris.')
+Offer.create(:photo => File.open('public/seed_images/IMG_0709.jpg'), :pickup_point => 'La Ruche, Paris', :user => @user, :category_id => 4, :title => 'Water jar', :description => 'Nunc tempor diam vehicula mauris.')
+Offer.create(:photo => File.open('public/seed_images/IMG_0710.jpg'), :pickup_point => 'La Ruche, Paris', :user => @user, :category_id => 4, :title => 'Stool', :description => 'Nunc tempor diam vehicula mauris.')
+Offer.create(:photo => File.open('public/seed_images/IMG_0711.jpg'), :pickup_point => 'La Ruche, Paris', :user => @user, :category_id => 4, :title => 'Teapot', :description => 'Nunc tempor diam vehicula mauris.')
+Offer.create(:photo => File.open('public/seed_images/IMG_0712.jpg'), :pickup_point => 'La Ruche, Paris', :user => @user, :category_id => 2, :title => 'SLR', :description => 'Nunc tempor diam vehicula mauris.')
+Offer.create(:photo => File.open('public/seed_images/IMG_0713.jpg'), :pickup_point => 'La Ruche, Paris', :user => @user, :category_id => 4, :title => 'Water jar', :description => 'Nunc tempor diam vehicula mauris.')
+Offer.create(:photo => File.open('public/seed_images/IMG_0714.jpg'), :pickup_point => 'La Ruche, Paris', :user => @user, :category_id => 4, :title => 'Wine glasses', :description => 'Nunc tempor diam vehicula mauris.')
+Offer.create(:photo => File.open('public/seed_images/IMG_0715.jpg'), :pickup_point => 'La Ruche, Paris', :user => @user, :category_id => 4, :title => 'Bottle lids', :description => 'Nunc tempor diam vehicula mauris.')
+Offer.create(:photo => File.open('public/seed_images/IMG_0716.jpg'), :pickup_point => 'La Ruche, Paris', :user => @user, :category_id => 5, :title => 'Box', :description => 'Nunc tempor diam vehicula mauris.')

0 comments on commit 3d5ade7

Please sign in to comment.