Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit b6c14fb

Browse files
committed
f
1 parent d4b111b commit b6c14fb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/discourse_dev/discourse_solved.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,24 @@ def self.populate(plugin)
1111

1212
solved_category =
1313
DiscourseDev::Record.random(
14-
Category.where(
14+
::Category.where(
1515
read_restricted: false,
1616
id: records.pluck(:id),
1717
parent_category_id: nil,
1818
),
1919
)
20-
CategoryCustomField.create!(
20+
::CategoryCustomField.create!(
2121
category_id: solved_category.id,
2222
name: ::DiscourseSolved::ENABLE_ACCEPTED_ANSWERS_CUSTOM_FIELD,
2323
value: "true",
2424
)
2525
puts "discourse-solved enabled on category '#{solved_category.name}' (#{solved_category.id})."
2626
elsif type == :topic
27-
topics = Topic.where(id: records.pluck(:id))
27+
topics = ::Topic.where(id: records.pluck(:id))
2828

2929
unless SiteSetting.allow_solved_on_all_topics
3030
solved_category_id =
31-
CategoryCustomField
31+
::CategoryCustomField
3232
.where(name: ::DiscourseSolved::ENABLE_ACCEPTED_ANSWERS_CUSTOM_FIELD, value: "true")
3333
.first
3434
.category_id

0 commit comments

Comments
 (0)