Merge pull request #2522 from hennevogel/bugfix/csrf_commercials
Bugfix/csrf commercials
This commit is contained in:
commit
4e79ba3e81
2 changed files with 1 additions and 1 deletions
|
|
@ -4,6 +4,7 @@ class CommercialsController < ApplicationController
|
||||||
load_resource :conference, find_by: :short_title
|
load_resource :conference, find_by: :short_title
|
||||||
before_action :set_event
|
before_action :set_event
|
||||||
load_and_authorize_resource through: :event
|
load_and_authorize_resource through: :event
|
||||||
|
skip_before_action :verify_authenticity_token
|
||||||
|
|
||||||
def create
|
def create
|
||||||
@commercial = @event.commercials.build(commercial_params)
|
@commercial = @event.commercials.build(commercial_params)
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
class SchedulesController < ApplicationController
|
class SchedulesController < ApplicationController
|
||||||
load_and_authorize_resource
|
load_and_authorize_resource
|
||||||
protect_from_forgery with: :null_session
|
|
||||||
before_action :respond_to_options
|
before_action :respond_to_options
|
||||||
load_resource :conference, find_by: :short_title
|
load_resource :conference, find_by: :short_title
|
||||||
load_resource :program, through: :conference, singleton: true, except: :index
|
load_resource :program, through: :conference, singleton: true, except: :index
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue