Files
discourse/app/models/badge_grouping.rb
T

31 lines
551 B
Ruby
Raw Normal View History

2014-07-17 12:25:16 +10:00
class BadgeGrouping < ActiveRecord::Base
2014-07-17 16:10:44 +10:00
2014-07-18 15:46:36 +10:00
GettingStarted = 1
Community = 2
Posting = 3
TrustLevel = 4
Other = 5
2014-07-17 16:10:44 +10:00
2014-07-17 12:25:16 +10:00
has_many :badges
2014-07-27 11:33:33 +10:00
2014-07-27 18:22:01 +10:00
def system?
id && id < 5
end
2014-07-27 11:33:33 +10:00
def default_position=(pos)
2014-07-27 18:32:04 +10:00
self.position ||= pos
2014-07-27 11:33:33 +10:00
end
2014-07-17 12:25:16 +10:00
end
2014-07-17 16:10:44 +10:00
# == Schema Information
#
# Table name: badge_groupings
#
# id :integer not null, primary key
# name :string(255) not null
2014-07-22 12:46:31 +10:00
# description :text
2014-07-17 16:10:44 +10:00
# position :integer not null
# created_at :datetime not null
# updated_at :datetime not null
2014-07-17 16:10:44 +10:00
#