1
0
mirror of https://github.com/danbee/my-images synced 2025-03-04 08:49:05 +00:00
my-images/app/views/images/_info.html.erb

21 lines
564 B
Plaintext

<div class="image-info">
<div class="image-tags" data-controller="tags">
<%= render "tags/tags", image: image, tags: image.tags %>
<div class="new-tag-form">
<%= form_with url: user_image_tags_path(image),
method: :post,
html: {
data: {
remote: true,
type: "html",
action: "ajax:success->tags#onPostSuccess"
}
} do %>
<%= text_field_tag :tag, nil, data: { target: "tags.tag" } %>
<%= submit_tag "Add Tag" %>
<% end %>
</div>
</div>
</div>