let form = document.getElementById('registrations')
let body = new FormData(form)
let headers = new Headers()
headers.append('X-CSRF_Token', body.get('authenticity_token'))
let action = form.action
fetch(action, {
headers: headers,
method: 'POST',
body: body
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ruby:2.4.1 | |
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev | |
# Node.js | |
RUN curl -sL https://deb.nodesource.com/setup_7.x | bash - \ | |
&& apt-get install -y nodejs | |
RUN apt-get update && apt-get install -y curl apt-transport-https wget && \ | |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ |
class Current < ActiveSupport::CurrentAttributes
attribute :user
end
application controller:
class ApplicationController < ActionController::Base