From 5df9370ebe6079368aa4a2dffd5a2e98877dbb71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Sat, 29 Jun 2013 21:45:15 +0200 Subject: [PATCH] Update search_result.rb Fix code styling --- lib/search/search_result.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/search/search_result.rb b/lib/search/search_result.rb index 59c1be1c774..6e45bdb5324 100644 --- a/lib/search/search_result.rb +++ b/lib/search/search_result.rb @@ -41,9 +41,12 @@ class Search end def self.from_post(p) - # we want the topic link when it's the OP - return SearchResult.from_topic(p.topic) if p.post_number == 1 - SearchResult.new(type: :topic, id: p.topic.id, title: p.topic.title, url: p.url) + if p.post_number == 1 + # we want the topic link when it's the OP + SearchResult.from_topic(p.topic) + else + SearchResult.new(type: :topic, id: p.topic.id, title: p.topic.title, url: p.url) + end end end