2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

Revert "A safe way to create class variables in a multisite environment."

The approach taken by this interface was flawed. We need a better
solution.
This commit is contained in:
Robin Ward 2017-09-29 11:04:05 -04:00
parent a370d7c7fd
commit 00b190af75
7 changed files with 24 additions and 107 deletions

View file

@ -1,14 +1,13 @@
# frozen_string_literal: true
require_dependency 'enum'
require_dependency 'multisite_class_var'
class Group < ActiveRecord::Base
include HasCustomFields
include AnonCacheInvalidator
include MultisiteClassVar
multisite_class_var(:preloaded_custom_field_names) { Set.new }
cattr_accessor :preloaded_custom_field_names
self.preloaded_custom_field_names = Set.new
has_many :category_groups, dependent: :destroy
has_many :group_users, dependent: :destroy