mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
automatic groups should be bootstrapped
This commit is contained in:
parent
805feca5f2
commit
6e1198334c
@ -89,6 +89,12 @@ class Group < ActiveRecord::Base
|
||||
end
|
||||
end
|
||||
|
||||
def self.ensure_automatic_groups!
|
||||
AUTO_GROUPS.keys.each do |name|
|
||||
refresh_automatic_group!(name) unless lookup_group(name)
|
||||
end
|
||||
end
|
||||
|
||||
def self.[](name)
|
||||
lookup_group(name) || refresh_automatic_group!(name)
|
||||
end
|
||||
|
1
db/fixtures/groups.rb
Normal file
1
db/fixtures/groups.rb
Normal file
@ -0,0 +1 @@
|
||||
Group.ensure_automatic_groups!
|
Loading…
Reference in New Issue
Block a user