I’m having trouble wrapping my head around how to do this.
If I have photo and photoset models with an :image file_column in photo, how do I process a directory of photos, rather than one at at time through a form, what’s the syntax?
ps = Photoset.new
Dir.glob(’*.jpg’).each do |f|
p = Photo.new
p.image = f <--------- This is the linkage I don’t believe is this easy?
ps.images << p
Anyone else done something like this? Google and list archive search haven’t done it for me.