Sha256: e4a8a64695724031ccd4db70d83f16244eea57b2f9936f267a34a2122a4afb7d

Contents?: true

Size: 975 Bytes

Versions: 9

Compression:

Stored size: 975 Bytes

Contents

# Create badges (Ambry)
badge_id = 0

# Rank badges (5 stars)
(1..5).each do |i|
  Badge.create!(
    :id => (badge_id = badge_id+1),
    :name => 'stars',
    :level => i
  )
end

# Normal badges
[
  {
    :id => (badge_id = badge_id+1),
    :name        => 'commenter',
    :description => 'You\'ve participated good in our boards!',
    :level       => 10
  }, {
    :id => (badge_id = badge_id+1),
    :name        => 'commenter',
    :description => 'You\'ve participated great in our boards!',
    :level       => 20
  }, {
    :id => (badge_id = badge_id+1),
    :name        => 'relevant-commenter',
    :description => 'You\'ve received 5 votes on a comment.',
    :level       => 5
  }, {
    :id => (badge_id = badge_id+1),
    :name        => 'autobiographer',
    :description => 'You\'ve edited your name and it\'s above 4 characters! (?)'
  }, {
    :id => (badge_id = badge_id+1),
    :name => 'just-registered'
  }
].each do |badge|
  Badge.create! badge
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
merit-0.6.0 test/dummy/config/initializers/badges_data.rb
merit-0.5.0 test/dummy/config/initializers/badges_data.rb
merit-0.4.2 test/dummy/config/initializers/badges_data.rb
merit-0.4.1 test/dummy/config/initializers/badges_data.rb
merit-0.4.0 test/dummy/config/initializers/badges_data.rb
merit-0.3.3 test/dummy/config/initializers/badges_data.rb
merit-0.3.2 test/dummy/config/initializers/badges_data.rb
merit-0.3.1 test/dummy/config/initializers/badges_data.rb
merit-0.3.0 test/dummy/config/initializers/badges_data.rb