discourse/lib/discourse_dev/reviewable_post.rb
Osama Sayegh 5a55c9062a
DEV: Add reviewables:populate rake task (#30540)
Adds a new reviewables:populate rake task that works in a similar fashion to the existing *:populate rake tasks. The rake task creates pending reviewable of all core types, with possibility for plugins to extend the task to populate their own reviewable types.
2025-01-03 10:05:04 +08:00

13 lines
254 B
Ruby

# frozen_string_literal: true
require "discourse_dev/reviewable"
require "faker"
module DiscourseDev
class ReviewablePost < Reviewable
def populate!
@posts.sample(2).each { |post| ::ReviewablePost.queue_for_review(post) }
end
end
end