class Current < ActiveSupport::CurrentAttributes
attribute :user
end
application controller:
class ApplicationController < ActionController::Base
class Current < ActiveSupport::CurrentAttributes
attribute :user
end
application controller:
class ApplicationController < ActionController::Base
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 - && \ |
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