discourse/plugins/chat/lib/extensions/category_extension.rb
Roman Rizzi 0a5f548635
DEV: Move discourse-chat to the core repo. (#18776)
As part of this move, we are also renaming `discourse-chat` to `chat`.
2022-11-02 10:41:30 -03:00

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