Sha256: 67de3bb51ed9571ade783c8f53fe7152c596fc380b49b7c41a577d156c6765fd

Contents?: true

Size: 665 Bytes

Versions: 16

Compression:

Stored size: 665 Bytes

Contents

grading_methods = [
  {
    name: 'Score',
    grading_type: 'score',
    description: 'Straight Score',
    curved: false
  },
  {
    name: 'Curved Score',
    grading_type: 'score',
    description: 'Curved Score',
    curved: true
  },
  {
    name: 'Percentage',
    grading_type: 'percentage',
    description: 'Straight Percentage',
    curved: false
  },
  {
    name: 'Curved Percentage',
    grading_type: 'percentage',
    description: 'Curved Percentage',
    curved: true
  }
]

say "Creating #{grading_methods.size} grading methods ...".yellow

grading_methods.each do |grading_method|
  Gaku::GradingMethod.where(grading_method).first_or_create!
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
gaku_sample-0.3.0 db/sample/gaku/20-grading_methods.rb
gaku_sample-0.3.0.pre.4 db/sample/gaku/20-grading_methods.rb
gaku_sample-0.3.0.pre.3 db/sample/gaku/20-grading_methods.rb
gaku_sample-0.3.0.pre.2 db/sample/gaku/20-grading_methods.rb
gaku_sample-0.3.0.pre.1 db/sample/gaku/20-grading_methods.rb
gaku_sample-0.3.0.pre.0 db/sample/gaku/20-grading_methods.rb
gaku-0.2.4 sample/db/sample/gaku/20-grading_methods.rb
gaku_sample-0.2.4 db/sample/gaku/20-grading_methods.rb
gaku-0.2.3 sample/db/sample/gaku/20-grading_methods.rb
gaku_sample-0.2.3 db/sample/gaku/20-grading_methods.rb
gaku-0.2.2 sample/db/sample/gaku/20-grading_methods.rb
gaku_sample-0.2.2 db/sample/gaku/20-grading_methods.rb
gaku-0.2.1 sample/db/sample/gaku/20-grading_methods.rb
gaku_sample-0.2.1 db/sample/gaku/20-grading_methods.rb
gaku-0.2.0 sample/db/sample/gaku/20-grading_methods.rb
gaku_sample-0.2.0 db/sample/gaku/20-grading_methods.rb