mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 17:51:16 +08:00
rails 4 deprecation fixes
This commit is contained in:
@ -112,9 +112,9 @@ class PostCreator
|
||||
|
||||
def track_latest_on_category
|
||||
if @post && @post.errors.count == 0 && @topic && @topic.category_id
|
||||
Category.update_all( {latest_post_id: @post.id}, {id: @topic.category_id} )
|
||||
Category.where(id: @topic.category_id).update_all(latest_post_id: @post.id)
|
||||
if @post.post_number == 1
|
||||
Category.update_all( {latest_topic_id: @topic.id}, {id: @topic.category_id} )
|
||||
Category.where(id: @topic.category_id).update_all(latest_topic_id: @topic.id)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user