Sha256: 1f49cccd8e7c2e5d5e4acf3ad9ca1b6d86929b81bdecac220e2a67a53a730bbe
Contents?: true
Size: 436 Bytes
Versions: 3
Compression:
Stored size: 436 Bytes
Contents
class AttachmentsDataset < Dataset::Base uses :images, :pages def load { :parent => [ :first, :second, :third ], :child => [ :fourth, :fifth, :sixth ]}.map do |page, attachments| attachments.each_with_index do |attachment, i| create_record :attachment, attachment, :image => images(attachment), :page => pages(page), :position => i+1 end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
radiant-images-extension-0.6.1 | spec/datasets/attachments.rb |
radiant-images-extension-0.6.0 | spec/datasets/attachments.rb |
radiant-images-extension-0.5.0 | spec/datasets/attachments.rb |