Sha256: f072a7b64247f589904971c5a498695857aa699a21f2b92d45470c00c67b1b53

Contents?: true

Size: 527 Bytes

Versions: 10

Compression:

Stored size: 527 Bytes

Contents

require 'shared_sample_data'

say "Creating #{@count[:disposals]} exam attachment disposals ...".yellow

batch_create(@count[:disposals]) do
  exam = Gaku::Exam.where(name: "#{Faker::Education.major} Exam").first_or_create!
  exam_portion = exam.exam_portions.where(name: "#{Faker::Education.major} ExamPortion", max_score: 100).first_or_create!
  Gaku::Attachment.create!(name: 'Attachment Name', attachable: exam_portion, asset: File.open(File.join(File.dirname(__FILE__), '..', 'images', '120x120.jpg')), deleted: true)
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
gaku-0.1.1 sample/db/sample/gaku/disposals/attachment_disposals.rb
gaku_sample-0.1.1 db/sample/gaku/disposals/attachment_disposals.rb
gaku-0.1.0 sample/db/sample/gaku/disposals/attachment_disposals.rb
gaku_sample-0.1.0 db/sample/gaku/disposals/attachment_disposals.rb
gaku_sample-0.0.3 db/sample/gaku/disposals/attachment_disposals.rb
gaku-0.0.3 sample/db/sample/gaku/disposals/attachment_disposals.rb
gaku-0.0.2 sample/db/sample/gaku/disposals/attachment_disposals.rb
gaku_sample-0.0.2 db/sample/gaku/disposals/attachment_disposals.rb
gaku-0.0.1 sample/db/sample/gaku/disposals/attachment_disposals.rb
gaku_sample-0.0.1 db/sample/gaku/disposals/attachment_disposals.rb