2014-06-17 02:29:49 -04:00
|
|
|
# Trust level system badges.
|
2014-05-04 14:15:38 -04:00
|
|
|
trust_level_badges = [
|
|
|
|
{id: 1, name: "Basic User", type: 3},
|
|
|
|
{id: 2, name: "Regular User", type: 3},
|
|
|
|
{id: 3, name: "Leader", type: 2},
|
|
|
|
{id: 4, name: "Elder", type: 1}
|
|
|
|
]
|
|
|
|
|
|
|
|
trust_level_badges.each do |spec|
|
|
|
|
Badge.seed do |b|
|
|
|
|
b.id = spec[:id]
|
|
|
|
b.name = spec[:name]
|
|
|
|
b.badge_type_id = spec[:type]
|
2014-07-03 03:29:44 -04:00
|
|
|
b.query = Badge::Queries.trust_level(spec[:id])
|
2014-05-04 14:15:38 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2014-07-03 03:29:44 -04:00
|
|
|
Badge.seed do |b|
|
|
|
|
b.id = Badge::Welcome
|
|
|
|
b.name = "Welcome"
|
|
|
|
b.badge_type_id = 3
|
|
|
|
b.multiple_grant = false
|
|
|
|
b.target_posts = true
|
|
|
|
b.query = Badge::Queries::Welcome
|
|
|
|
end
|
2014-05-15 20:34:06 -04:00
|
|
|
|
2014-07-03 03:29:44 -04:00
|
|
|
Badge.seed do |b|
|
|
|
|
b.id = Badge::Autobiographer
|
|
|
|
b.name = "Autobiographer"
|
|
|
|
b.badge_type_id = 3
|
|
|
|
b.multiple_grant = false
|
|
|
|
b.query = Badge::Queries::Autobiographer
|
2014-05-04 14:15:38 -04:00
|
|
|
end
|
2014-07-03 03:29:44 -04:00
|
|
|
|
2014-06-17 02:29:49 -04:00
|
|
|
#
|
|
|
|
# Like system badges.
|
|
|
|
like_badges = [
|
|
|
|
{id: 6, name: "Nice Post", type: 3, multiple: true},
|
|
|
|
{id: 7, name: "Good Post", type: 2, multiple: true},
|
|
|
|
{id: 8, name: "Great Post", type: 1, multiple: true}
|
|
|
|
]
|
|
|
|
|
|
|
|
like_badges.each do |spec|
|
|
|
|
Badge.seed do |b|
|
|
|
|
b.id = spec[:id]
|
|
|
|
b.name = spec[:name]
|
|
|
|
b.badge_type_id = spec[:type]
|
|
|
|
b.multiple_grant = spec[:multiple]
|
2014-07-03 03:29:44 -04:00
|
|
|
b.target_posts = true
|
|
|
|
b.query = Badge::Queries.like_badge(Badge.like_badge_counts[spec[:id]])
|
2014-06-17 02:29:49 -04:00
|
|
|
end
|
|
|
|
end
|