mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 09:08:10 +08:00
Add Topic#max_post_number to find max post number
This commit is contained in:
@ -476,6 +476,10 @@ class Topic < ActiveRecord::Base
|
||||
first_post_number
|
||||
end
|
||||
|
||||
def max_post_number
|
||||
posts.maximum(:post_number).to_i
|
||||
end
|
||||
|
||||
def move_posts(moved_by, post_ids, opts)
|
||||
|
||||
topic = nil
|
||||
|
Reference in New Issue
Block a user