Replace more Commercials with Materials
This commit is contained in:
parent
3eeaebbdc8
commit
8a6bb87983
18 changed files with 50 additions and 50 deletions
|
|
@ -17,10 +17,10 @@ module Admin
|
|||
|
||||
if @commercial.save
|
||||
redirect_to admin_conference_commercials_path,
|
||||
notice: 'Commercial was successfully created.'
|
||||
notice: 'Materials were successfully created.'
|
||||
else
|
||||
redirect_to admin_conference_commercials_path,
|
||||
error: 'An error prohibited this Commercial from being saved: '\
|
||||
error: 'An error prohibited materials from being saved: '\
|
||||
"#{@commercial.errors.full_messages.join('. ')}."
|
||||
|
||||
end
|
||||
|
|
@ -29,17 +29,17 @@ module Admin
|
|||
def update
|
||||
if @commercial.update(commercial_params)
|
||||
redirect_to admin_conference_commercials_path,
|
||||
notice: 'Commercial was successfully updated.'
|
||||
notice: 'Materials were successfully updated.'
|
||||
else
|
||||
redirect_to admin_conference_commercials_path,
|
||||
error: 'An error prohibited this Commercial from being saved: '\
|
||||
error: 'An error prohibited materials from being saved: '\
|
||||
"#{@commercial.errors.full_messages.join('. ')}."
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@commercial.destroy
|
||||
redirect_to admin_conference_commercials_path, notice: 'Materaisl were successfully removed.'
|
||||
redirect_to admin_conference_commercials_path, notice: 'Materials were successfully removed.'
|
||||
end
|
||||
|
||||
def render_commercial
|
||||
|
|
|
|||
|
|
@ -12,10 +12,10 @@ module Admin
|
|||
|
||||
if @commercial.save
|
||||
redirect_to admin_conference_venue_path,
|
||||
notice: 'Commercial was successfully created.'
|
||||
notice: 'Materials successfully created.'
|
||||
else
|
||||
redirect_to admin_conference_venue_path,
|
||||
error: 'An error prohibited this Commercial from being saved: '\
|
||||
error: 'An error prohibited materials from being saved: '\
|
||||
"#{@commercial.errors.full_messages.join('. ')}."
|
||||
|
||||
end
|
||||
|
|
@ -24,17 +24,17 @@ module Admin
|
|||
def update
|
||||
if @commercial.update(commercial_params)
|
||||
redirect_to admin_conference_venue_path,
|
||||
notice: 'Commercial was successfully updated.'
|
||||
notice: 'Materials successfully updated.'
|
||||
else
|
||||
redirect_to admin_conference_venue_path,
|
||||
error: 'An error prohibited this Commercial from being saved: '\
|
||||
error: 'An error prohibited materials from being saved: '\
|
||||
"#{@commercial.errors.full_messages.join('. ')}."
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@commercial.destroy
|
||||
redirect_to admin_conference_venue_path, notice: 'Commercial was successfully destroyed.'
|
||||
redirect_to admin_conference_venue_path, notice: 'Materials successfully destroyed.'
|
||||
end
|
||||
|
||||
def render_commercial
|
||||
|
|
|
|||
|
|
@ -12,27 +12,27 @@ class CommercialsController < ApplicationController
|
|||
|
||||
if @commercial.save
|
||||
redirect_to edit_conference_program_proposal_path(conference_id: @conference.short_title, id: @event.id, anchor: 'commercials-content'),
|
||||
notice: 'Commercial was successfully created.'
|
||||
notice: 'Materials were successfully created.'
|
||||
else
|
||||
redirect_to edit_conference_program_proposal_path(conference_id: @conference.short_title, id: @event.id, anchor: 'commercials-content'),
|
||||
error: "An error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}."
|
||||
error: "An error prohibited these materials from being saved: #{@commercial.errors.full_messages.join('. ')}."
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
if @commercial.update(commercial_params)
|
||||
redirect_to edit_conference_program_proposal_path(conference_id: @conference.short_title, id: @event.id, anchor: 'commercials-content'),
|
||||
notice: 'Commercial was successfully updated.'
|
||||
notice: 'Materials were successfully updated.'
|
||||
else
|
||||
redirect_to edit_conference_program_proposal_path(conference_id: @conference.short_title, id: @event.id, anchor: 'commercials-content'),
|
||||
error: "An error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}."
|
||||
error: "An error prohibited materials from being saved: #{@commercial.errors.full_messages.join('. ')}."
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@commercial.destroy
|
||||
redirect_to edit_conference_program_proposal_path(conference_id: @conference.short_title, id: @event.id),
|
||||
notice: 'Commercial was successfully destroyed.'
|
||||
notice: 'Materials were successfully destroyed.'
|
||||
end
|
||||
|
||||
def render_commercial
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue