From b54a8458d5029b3494165b7430e21b3ae34ecc0c Mon Sep 17 00:00:00 2001 From: hellekin Date: Fri, 22 Jan 2021 05:32:15 +0100 Subject: Upgrade Rails and add StimulusJS support --- app/views/categories/_category.html.erb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 app/views/categories/_category.html.erb (limited to 'app/views/categories/_category.html.erb') diff --git a/app/views/categories/_category.html.erb b/app/views/categories/_category.html.erb new file mode 100644 index 0000000..d301fe6 --- /dev/null +++ b/app/views/categories/_category.html.erb @@ -0,0 +1,17 @@ +
+
+

<%= category.taxonomy.name %>

+

<%= category.name %>

+
+

<%= h category.summary %>

+
<%= h category.description %>
+

Info

+

<%= pluralize(category.sections_count, 'section') %>

+

<%= pluralize(category.sections.map { |s| s.resources }.sum(&:count) || 0, 'resources') %>

+
+
+
    +
  • <%= link_to 'edit', edit_category_path(category) %>
  • +
+
+
-- cgit v1.2.3