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:
parent
c611214a60
commit
539de55297
@ -13,8 +13,8 @@ export default class extends Controller {
|
|||||||
.then(response => {
|
.then(response => {
|
||||||
if (response.status == 200) {
|
if (response.status == 200) {
|
||||||
this.tagListTarget.innerHTML += response.data;
|
this.tagListTarget.innerHTML += response.data;
|
||||||
};
|
|
||||||
this.tagTarget.value = "";
|
this.tagTarget.value = "";
|
||||||
|
};
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,9 +5,9 @@
|
|||||||
<div class="new-tag-form">
|
<div class="new-tag-form">
|
||||||
<%= form_tag user_image_tags_path(image),
|
<%= form_tag user_image_tags_path(image),
|
||||||
method: :post,
|
method: :post,
|
||||||
data: { remote: true, action: "tags#create" } do %>
|
data: { action: "tags#create" } do %>
|
||||||
<%= text_field_tag :tag, nil, data: { target: "tags.tag" } %>
|
<%= text_field_tag :tag, nil, data: { target: "tags.tag" } %>
|
||||||
<%= submit_tag "Add Tag" %>
|
<%= submit_tag "Add Tag", data: { disable_with: false } %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user