Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Set Forum#last_post_forum to nil if the post was from one of this for…

…um's topics, rather than a descedant's.
  • Loading branch information...
commit d10662f0b01505636f74251b5b8f2abc5c485e9a 1 parent c966987
@chrisdarroch chrisdarroch authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  app/models/forum.rb
View
2  app/models/forum.rb
@@ -31,7 +31,7 @@ def update_last_post
post = latest_descendant_post || nil
post_forum = post.try(:forum)
self.last_post = post
- self.last_post_forum = post_forum
+ self.last_post_forum = (post_forum == self) ? nil : post_forum
save!
end
ancestors.each { |ancestor| ancestor.update_last_post }
Please sign in to comment.
Something went wrong with that request. Please try again.