Refactoring of proposal workflow. Fixes #215
This commit is contained in:
parent
333c5e39bf
commit
e6bb168c5e
35 changed files with 491 additions and 192 deletions
|
|
@ -15,7 +15,7 @@ class CommercialsController < ApplicationController
|
|||
authorize! :create, @commercial
|
||||
|
||||
if @commercial.save
|
||||
redirect_to edit_conference_proposal_path(conference_id: @conference.short_title, id: @event.id),
|
||||
redirect_to edit_conference_proposal_path(conference_id: @conference.short_title, id: @event.id, anchor: 'commercials-content'),
|
||||
notice: 'Commercial was successfully created.'
|
||||
else
|
||||
flash[:error] = "An error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}."
|
||||
|
|
@ -25,7 +25,7 @@ class CommercialsController < ApplicationController
|
|||
|
||||
def update
|
||||
if @commercial.update(commercial_params)
|
||||
redirect_to edit_conference_proposal_path(conference_id: @conference.short_title, id: @event.id),
|
||||
redirect_to edit_conference_proposal_path(conference_id: @conference.short_title, id: @event.id, anchor: 'commercials-content'),
|
||||
notice: 'Commercial was successfully updated.'
|
||||
else
|
||||
flash[:error] = "An error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue