Rename the volunteers to match the other config routes

This commit is contained in:
Henne Vogelsang 2014-03-04 10:30:23 +01:00
parent 97eae285c5
commit 5b05ffbd56
2 changed files with 6 additions and 8 deletions

View file

@ -11,13 +11,11 @@ class Admin::VolunteersController < ApplicationController
def update
@conference = Conference.find_all_by_short_title(params[:conference_id]).first
# @conference.update_attributes(params[:conference])
# redirect_to admin_conference_volunteers_path(@conference.short_title)
begin
begin
@conference.update_attributes!(params[:conference])
redirect_to(admin_conference_volunteer_options_path(:conference_id => params[:conference_id]), :notice => "Volunteering options were successfully updated.")
rescue Exception => e
redirect_to(admin_conference_volunteer_options_path(:conference_id => params[:conference_id]), :alert => "Volunteering options update failed: #{e.message}")
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

View file

@ -31,8 +31,8 @@ Osem::Application.routes.draw do
get "/dietary_choices" => "dietchoices#show", :as => "dietary_list"
put "/dietary_choices" => "dietchoices#update", :as => "dietary_update"
get "/volunteers_list" => "volunteers#show"
get "/volunteers" => "volunteers#index", :as => "volunteer_options"
put "/volunteers" => "volunteers#update", :as => "volunteer_options_update"
get "/volunteers" => "volunteers#index", :as => "volunteers_info"
put "/volunteers" => "volunteers#update", :as => "volunteers_update"
get "/cfp" => "callforpapers#show", :as => "cfp_info"
put "/cfp" => "callforpapers#update", :as => "cfp_update"
post "/cfp" => "callforpapers#create", :as => "cfp_create"