Sha256: 2b79e21a273b63d1b526b63de714c189db43e814d22b2a9d97dea4028b97405b
Contents?: true
Size: 493 Bytes
Versions: 7
Compression:
Stored size: 493 Bytes
Contents
class ImagesDataset < Dataset::Base def load images = [ :first, :second, :third, :fourth, :fifth, :sixth ] images.each_with_index do |image, i| create_record :image, image.to_sym, :title => image.to_s, :caption => "caption for #{image.to_s}", :asset_file_name => "#{image.to_s}.png", :asset_content_type => "image/png", :asset_file_size => i+1*1000, :position => i+1 end end end
Version data entries
7 entries across 7 versions & 1 rubygems