mirror of
https://github.com/discourse/discourse.git
synced 2024-12-21 08:53:46 +08:00
1476e17c35
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.
23 lines
647 B
Ruby
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
|
|
#
|