Fix subcategories links from search

This commit is contained in:
verg
2014-02-16 12:45:00 -05:00
parent 22af3fe085
commit f723f11443
3 changed files with 22 additions and 1 deletions

View File

@ -24,7 +24,7 @@ class Search
end
def self.from_category(c)
SearchResult.new(type: :category, id: c.id, title: c.name, url: "/category/#{c.slug}").tap do |r|
SearchResult.new(type: :category, id: c.id, title: c.name, url: c.url).tap do |r|
r.color = c.color
r.text_color = c.text_color
end