best-teacher-production edited this page Sep 1, 2015 · 3 revisions
Clone this wiki locally

Welcome to the seed-fu wiki!

How to seed a file if you have a model that uses Paperclip:
I created a directory called ‘simages’ with the files to seed, though it could be anywhere (public/images, test/fixtures etc.). Then it’s just:

  s.logo = File.new("#{Rails.root}/simages/logo.jpg")