- categories = [category]
- categories << category while (category = category.parent_category).present?
= categories.reverse.map { |category| link_to(category.name, category) }.join('&nbsp; | &nbsp;').html_safe
