|
|
|
@ -65,7 +65,7 @@ class ContestnotificationsController < ApplicationController
|
|
|
|
|
# GET /contestnotifications/1
|
|
|
|
|
# GET /contestnotifications/1.json
|
|
|
|
|
def show
|
|
|
|
|
# @contestnotification = Contestnotification.find(params[:id])
|
|
|
|
|
@contestnotification = Contestnotification.find(params[:id])
|
|
|
|
|
#
|
|
|
|
|
# respond_to do |format|
|
|
|
|
|
# format.html # show.html.erb
|
|
|
|
@ -136,12 +136,12 @@ class ContestnotificationsController < ApplicationController
|
|
|
|
|
# format.json { render json: @contestnotification.errors, status: :unprocessable_entity }
|
|
|
|
|
# end
|
|
|
|
|
# end
|
|
|
|
|
@contestnotifications.safe_attributes = params[:contestnotifications]
|
|
|
|
|
@contestnotifications.save_attachments(params[:attachments])
|
|
|
|
|
if @contestnotifications.save
|
|
|
|
|
render_attachment_warning_if_needed(@contestnotifications)
|
|
|
|
|
@contestnotification.safe_attributes = params[:contestnotification]
|
|
|
|
|
@contestnotification.save_attachments(params[:attachments])
|
|
|
|
|
if @contestnotification.save
|
|
|
|
|
render_attachment_warning_if_needed(@contestnotification)
|
|
|
|
|
flash[:notice] = l(:notice_successful_update)
|
|
|
|
|
redirect_to contestnotification_path(@contestnotifications)
|
|
|
|
|
redirect_to contest_contestnotification_path(@contestnotification)
|
|
|
|
|
else
|
|
|
|
|
render :action => 'edit'
|
|
|
|
|
end
|
|
|
|
@ -158,7 +158,7 @@ class ContestnotificationsController < ApplicationController
|
|
|
|
|
# format.json { head :no_content }
|
|
|
|
|
# end
|
|
|
|
|
@contestnotifications.destroy
|
|
|
|
|
redirect_to contest_contestnotification_index_path(@contest)
|
|
|
|
|
redirect_to contest_contestnotifications_path(@contest)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
private
|
|
|
|
|