osem-fcy/app/controllers/admin/dietchoices_controller.rb
2014-08-06 21:26:08 +03:00

18 lines
584 B
Ruby

module Admin
class DietchoicesController < ApplicationController
before_filter :verify_organizer
def show
render :diets_list
end
def update
begin
@conference.update_attributes!(params[:conference])
redirect_to(admin_conference_dietary_list_path(conference_id: @conference.short_title), notice: 'Dietary choices were successfully updated.')
rescue => e
redirect_to(admin_conference_dietary_list_path(conference_id: @conference.short_title), alert: "Dietary choices update failed: #{e.message}")
end
end
end
end