Add reloadable support for patching in an avatar lookup

This commit is contained in:
Robin Ward 2017-08-30 14:24:03 -04:00
parent 64bb0f9f05
commit e7885c20cb
1 changed files with 7 additions and 0 deletions

View File

@ -96,6 +96,13 @@ class Plugin::Instance
end
end
def custom_avatar_column(column)
reloadable_patch do |plugin|
AvatarLookup.lookup_columns << column
AvatarLookup.lookup_columns.uniq!
end
end
# Extend a class but check that the plugin is enabled
# for class methods use `add_class_method`
def add_to_class(class_name, attr, &block)