discourse/app/models/linked_topic.rb
Arpit Jalan 1476e17c35
FEATURE: new setting to create a linked topic on autoclosing mega topics (#11001)
This commit adds a site setting `auto_close_topics_create_linked_topic`
which when enabled works in conjunction with `auto_close_topics_post_count`
setting and creates a new linked topic for the topic just closed.

The auto-created new topic contains a link for all the previous topics
and the topic titles are appended with `(Part {n})`.

The setting is enabled by default.
2020-11-02 12:18:48 +05:30

23 lines
647 B
Ruby

# frozen_string_literal: true
class LinkedTopic < ActiveRecord::Base
belongs_to :topic
end
# == Schema Information
#
# Table name: linked_topics
#
# id :bigint not null, primary key
# topic_id :bigint not null
# original_topic_id :bigint not null
# sequence :integer not null
# created_at :datetime not null
# updated_at :datetime not null
#
# Indexes
#
# index_linked_topics_on_topic_id_and_original_topic_id (topic_id,original_topic_id) UNIQUE
# index_linked_topics_on_topic_id_and_sequence (topic_id,sequence) UNIQUE
#