From e921e4da2209aced82ddb64a015a526c22489911 Mon Sep 17 00:00:00 2001 From: Stella Rouzi Date: Thu, 15 May 2014 21:04:08 +0300 Subject: [PATCH] new Ruby 1.9 hash syntax --- app/controllers/admin/registrations_controller.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/controllers/admin/registrations_controller.rb b/app/controllers/admin/registrations_controller.rb index ce5f644f..3577ef91 100644 --- a/app/controllers/admin/registrations_controller.rb +++ b/app/controllers/admin/registrations_controller.rb @@ -19,7 +19,7 @@ class Admin::RegistrationsController < ApplicationController end redirect_to admin_conference_registrations_path(@conference.short_title) - flash[:notice] = "Updated '#{params[:view_field]}' => #{@registration.attended} for + flash[:notice] = "Updated '#{params[:view_field]}' => #{@registration.attended} for #{(Person.where("id = ?", @registration.person_id).first).email}" end @@ -43,8 +43,8 @@ class Admin::RegistrationsController < ApplicationController redirect_to(admin_conference_registrations_path(@conference.short_title)) rescue Exception => e 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 end end @@ -122,13 +122,13 @@ class Admin::RegistrationsController < ApplicationController flash[:notice] = "Deleted registration for #{person.public_name} #{person.email}" rescue Exception => e 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 end 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 \ No newline at end of file