mirror of
https://github.com/discourse/discourse.git
synced 2025-03-07 03:39:34 +00:00
15 lines
302 B
Ruby
15 lines
302 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Chat::CategoryExtension
|
|
extend ActiveSupport::Concern
|
|
|
|
include Chatable
|
|
|
|
prepended { has_one :category_channel, as: :chatable }
|
|
|
|
def cannot_delete_reason
|
|
return I18n.t("category.cannot_delete.has_chat_channels") if category_channel
|
|
super
|
|
end
|
|
end
|