Skip to content
Snippets Groups Projects
Commit 55ccb7b7 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

Merge branch 'main' of github.com:noesya/osuny

parents 44b5cc43 685ccdb4
No related branches found
No related tags found
No related merge requests found
......@@ -107,6 +107,10 @@ class Communication::Website::Category < ApplicationRecord
self.class.unscoped.where(parent: parent, university: university, website: website).where.not(id: id)
end
def slug_with_ancestors_slugs
(ancestors.map(&:slug) << slug).join('/')
end
protected
def last_ordered_element
......
......@@ -12,7 +12,7 @@ authors:
<% if @about.categories.any? %>
categories:
<% @about.categories.each do |category| %>
- "<%= category.slug %>"
- "<%= category.slug_with_ancestors_slugs %>"
<% end %>
<% end %>
<%= render 'admin/communication/unsplash/static' %>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment