mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-02-17 04:01:29 -05:00
FIX: allow position to be changed post seed
This commit is contained in:
parent
782773f774
commit
0ab456b647
2 changed files with 9 additions and 5 deletions
|
@ -7,6 +7,10 @@ class BadgeGrouping < ActiveRecord::Base
|
|||
Other = 5
|
||||
|
||||
has_many :badges
|
||||
|
||||
def default_position=(pos)
|
||||
position ||= pos
|
||||
end
|
||||
end
|
||||
|
||||
# == Schema Information
|
||||
|
|
|
@ -2,31 +2,31 @@
|
|||
BadgeGrouping.seed do |g|
|
||||
g.id = BadgeGrouping::GettingStarted
|
||||
g.name = "Getting Started"
|
||||
g.position = 10
|
||||
g.default_position = 10
|
||||
end
|
||||
|
||||
BadgeGrouping.seed do |g|
|
||||
g.id = BadgeGrouping::Community
|
||||
g.name = "Community"
|
||||
g.position = 11
|
||||
g.default_position = 11
|
||||
end
|
||||
|
||||
BadgeGrouping.seed do |g|
|
||||
g.id = BadgeGrouping::Posting
|
||||
g.name = "Posting"
|
||||
g.position = 12
|
||||
g.default_position = 12
|
||||
end
|
||||
|
||||
BadgeGrouping.seed do |g|
|
||||
g.id = BadgeGrouping::TrustLevel
|
||||
g.name = "Trust Level"
|
||||
g.position = 13
|
||||
g.default_position = 13
|
||||
end
|
||||
|
||||
BadgeGrouping.seed do |g|
|
||||
g.id = BadgeGrouping::Other
|
||||
g.name = "Other"
|
||||
g.position = 14
|
||||
g.default_position = 14
|
||||
end
|
||||
|
||||
# BUGFIX
|
||||
|
|
Loading…
Reference in a new issue