mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-14 12:14:03 +00:00
21 lines
874 B
Ruby
21 lines
874 B
Ruby
class Admin::VolunteersController < ApplicationController
|
|
def index
|
|
@conference = Conference.find_all_by_short_title(params[:conference_id]).first
|
|
render :index
|
|
end
|
|
|
|
def show
|
|
@conference = Conference.find_all_by_short_title(params[:conference_id]).first
|
|
@volunteers = @conference.registrations.joins(:vchoices).all
|
|
end
|
|
|
|
def update
|
|
@conference = Conference.find_all_by_short_title(params[:conference_id]).first
|
|
begin
|
|
@conference.update_attributes!(params[:conference])
|
|
redirect_to(admin_conference_volunteer_info_path(:conference_id => params[:conference_id]), :notice => "Volunteering options were successfully updated.")
|
|
rescue Exception => e
|
|
redirect_to(admin_conference_volunteer_info_path(:conference_id => params[:conference_id]), :alert => "Volunteering options update failed: #{e.message}")
|
|
end
|
|
end
|
|
end
|