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

Fix issue with adding tags

This commit is contained in:
Daniel Barber 2018-10-19 11:34:51 -04:00
parent c611214a60
commit 539de55297
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8
3 changed files with 4 additions and 4 deletions

View File

@ -13,8 +13,8 @@ export default class extends Controller {
.then(response => {
if (response.status == 200) {
this.tagListTarget.innerHTML += response.data;
};
this.tagTarget.value = "";
};
})
}
}

View File

@ -5,9 +5,9 @@
<div class="new-tag-form">
<%= form_tag user_image_tags_path(image),
method: :post,
data: { remote: true, action: "tags#create" } do %>
data: { action: "tags#create" } do %>
<%= text_field_tag :tag, nil, data: { target: "tags.tag" } %>
<%= submit_tag "Add Tag" %>
<%= submit_tag "Add Tag", data: { disable_with: false } %>
<% end %>
</div>
</div>