mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 17:40:43 +08:00
Allow badges to be marked as "titleable".
This commit is contained in:
@ -4,6 +4,7 @@ class Badge < ActiveRecord::Base
|
||||
|
||||
validates :name, presence: true, uniqueness: true
|
||||
validates :badge_type, presence: true
|
||||
validates :allow_title, inclusion: [true, false]
|
||||
end
|
||||
|
||||
# == Schema Information
|
||||
@ -17,8 +18,10 @@ end
|
||||
# grant_count :integer default(0), not null
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# allow_title :boolean default(FALSE), not null
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
# index_badges_on_name (name) UNIQUE
|
||||
# index_badges_on_badge_type_id (badge_type_id)
|
||||
# index_badges_on_name (name) UNIQUE
|
||||
#
|
||||
|
Reference in New Issue
Block a user