discourse/app/models/badge_grouping.rb
Gerhard Schlager 8517674a32 UX: Show translated badge names and badge groupings
FIX: Disallow renaming of system badges
FIX: Disallow renaming/deleting of system badge groupings
UX: Use "modern" button style in badge groupings dialog
2015-12-30 23:35:16 +01:00

31 lines
552 B
Ruby

class BadgeGrouping < ActiveRecord::Base
GettingStarted = 1
Community = 2
Posting = 3
TrustLevel = 4
Other = 5
has_many :badges
def system?
id && id <= 5
end
def default_position=(pos)
self.position ||= pos
end
end
# == Schema Information
#
# Table name: badge_groupings
#
# id :integer not null, primary key
# name :string(255) not null
# description :text
# position :integer not null
# created_at :datetime not null
# updated_at :datetime not null
#