Skip CSRF authenticity

The way we are handling adding commercials (preload with javascript)
leads to an outdated token otherwise.
This commit is contained in:
Henne Vogelsang 2019-05-24 14:08:23 +02:00
parent 84b25e3a54
commit 7338bc2648
No known key found for this signature in database
GPG key ID: 9D6164C2955FADE0

View file

@ -4,6 +4,7 @@ class CommercialsController < ApplicationController
load_resource :conference, find_by: :short_title
before_action :set_event
load_and_authorize_resource through: :event
skip_before_action :verify_authenticity_token
def create
@commercial = @event.commercials.build(commercial_params)