Sha256: 47083de1a7fda4a2d49bd6c0fd4d398225fc4e80901f4565208986ce6411810d
Contents?: true
Size: 477 Bytes
Versions: 2
Compression:
Stored size: 477 Bytes
Contents
class ImagesDataset < Dataset::Base def load images = [ :first, :second, :third, :fourth, :fifth ] images.each_with_index do |image, i| create_record :image, image.to_sym, :title => image.to_s, :caption => 'brief description', :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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
radiant-images-extension-0.1.1 | spec/datasets/images.rb |
radiant-images-extension-0.1.0 | spec/datasets/images.rb |