houndci fixes
This commit is contained in:
parent
7490316a5b
commit
544146e7a9
2 changed files with 10 additions and 6 deletions
|
|
@ -19,7 +19,8 @@ class Admin::RegistrationsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
redirect_to admin_conference_registrations_path(@conference.short_title)
|
redirect_to admin_conference_registrations_path(@conference.short_title)
|
||||||
flash[:notice] = "Updated '#{params[:view_field]}' => #{@registration.attended} for #{(Person.where("id = ?", @registration.person_id).first).email}"
|
flash[:notice] = "Updated '#{params[:view_field]}' => #{@registration.attended} for
|
||||||
|
#{(Person.where("id = ?", @registration.person_id).first).email}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
|
|
@ -42,7 +43,8 @@ class Admin::RegistrationsController < ApplicationController
|
||||||
redirect_to(admin_conference_registrations_path(@conference.short_title))
|
redirect_to(admin_conference_registrations_path(@conference.short_title))
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
Rails.logger.debug e.backtrace.join("\n")
|
Rails.logger.debug e.backtrace.join("\n")
|
||||||
redirect_to(admin_conference_registrations_path(@conference.short_title), :alert => 'Failed to update registration:' + e.message)
|
redirect_to(admin_conference_registrations_path(@conference.short_title),
|
||||||
|
:alert => 'Failed to update registration:' + e.message)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -120,11 +122,13 @@ class Admin::RegistrationsController < ApplicationController
|
||||||
flash[:notice] = "Deleted registration for #{person.public_name} #{person.email}"
|
flash[:notice] = "Deleted registration for #{person.public_name} #{person.email}"
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
Rails.logger.debug e.backtrace.join("\n")
|
Rails.logger.debug e.backtrace.join("\n")
|
||||||
redirect_to(admin_conference_registrations_path(@conference.short_title), :alert => 'Failed to delete registration:' + e.message)
|
redirect_to(admin_conference_registrations_path(@conference.short_title),
|
||||||
|
:alert => 'Failed to delete registration:' + e.message)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
redirect_to(admin_conference_registrations_path(@conference.short_title), :alert => 'You must be an admin to delete a registration.')
|
redirect_to(admin_conference_registrations_path(@conference.short_title),
|
||||||
|
:alert => 'You must be an admin to delete a registration.')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -16,8 +16,8 @@ Osem::Application.routes.draw do
|
||||||
get "/volunteers_list" => "volunteers#show"
|
get "/volunteers_list" => "volunteers#show"
|
||||||
get "/volunteers" => "volunteers#index", :as => "volunteers_info"
|
get "/volunteers" => "volunteers#index", :as => "volunteers_info"
|
||||||
patch "/volunteers" => "volunteers#update", :as => "volunteers_update"
|
patch "/volunteers" => "volunteers#update", :as => "volunteers_update"
|
||||||
|
|
||||||
patch "/registrations/change_field" => "registrations#change_field"
|
patch '/registrations/change_field' => 'registrations#change_field'
|
||||||
resources :registrations
|
resources :registrations
|
||||||
|
|
||||||
resources :difficulty_levels, only: [:show, :update, :index]
|
resources :difficulty_levels, only: [:show, :update, :index]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue