Skip to content

Instantly share code, notes, and snippets.

@adoji92

adoji92/one.js

Created Apr 23, 2020
Embed
What would you like to do?
import Rails from '@rails/ujs'
Rails.ajax({
url: `http://SERVER_URL/tasks/${task.id}`
type: 'PATCH',
data: data,
dataType: 'JSON',
});
const data = new FormData();
data.append('task[assignee_id]', this.someUserId || '');
data.append('task[name]', this.taskName || '');
const data = new FormData();
data.append('task[assignee_id]', this.someUserId);
data.append('task[name]', this.taskName);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment