aboutsummaryrefslogtreecommitdiff
path: root/app/views/categories/_edit.html.erb
diff options
context:
space:
mode:
authorhellekin <hellekin@cepheide.org>2021-01-22 05:32:15 +0100
committerhellekin <hellekin@cepheide.org>2021-01-22 05:32:15 +0100
commitb54a8458d5029b3494165b7430e21b3ae34ecc0c (patch)
tree32ea6fc6b8774f672325fec52f0ffc97229a9568 /app/views/categories/_edit.html.erb
parent1c1aead78192982e221179de6688b944e5b01bf6 (diff)
downloadincommon-map-b54a8458d5029b3494165b7430e21b3ae34ecc0c.tar.gz
Upgrade Rails and add StimulusJS support
Diffstat (limited to 'app/views/categories/_edit.html.erb')
-rw-r--r--app/views/categories/_edit.html.erb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/views/categories/_edit.html.erb b/app/views/categories/_edit.html.erb
new file mode 100644
index 0000000..4a2da94
--- /dev/null
+++ b/app/views/categories/_edit.html.erb
@@ -0,0 +1,6 @@
+<h3>Edit <%= @category.presence&.name || 'new category' %></h3>
+<h2>Context: <%= @taxonomy %></h2>
+
+<%= form_with model: [@taxonomy,@category], url: controller.action_name == 'new' ? taxonomy_categories_path(taxonomy: @taxonomy) : category_path(@category) do |f| %>
+ <%= render partial: 'form', locals: { category: category, f: f } %>
+<% end %>