diff --git a/app/views/admin/communication/blocks/templates/posts/_edit.html.erb b/app/views/admin/communication/blocks/templates/posts/_edit.html.erb index fc343bc2c34e1cadd52935c0af4062365ee271d2..a022d14ac31ad4de5ff3a1f99fc7eb930f746438 100644 --- a/app/views/admin/communication/blocks/templates/posts/_edit.html.erb +++ b/app/views/admin/communication/blocks/templates/posts/_edit.html.erb @@ -1,3 +1,5 @@ +<% categories = collection_tree(@block.about&.website.categories.ordered) %> + <div class="row mb-1"> <div class="col-md-6"> @@ -31,7 +33,7 @@ <select id="category_id" class="form-select select" v-model="data.category_id"> - <% @block.about&.website.categories.ordered.each_with_index do |category, index| %> + <% categories.each_with_index do |category, index| %> <option value="<%= category.id %>"><%= category %></option> <% end %> </select>