move topic excerpt code to one method to DRY it up and for extensibility

This commit is contained in:
Neil Lalonde
2018-04-17 15:08:13 -04:00
parent 3e2ba081d7
commit 8fc1289172
3 changed files with 6 additions and 2 deletions

View File

@@ -533,7 +533,7 @@ class PostRevisor
end
def update_topic_excerpt
excerpt = @post.excerpt(220, strip_links: true)
excerpt = @post.excerpt_for_topic
@topic.update_column(:excerpt, excerpt)
if @topic.archetype == "banner"
ApplicationController.banner_json_cache.clear