new Ruby 1.9 hash syntax

This commit is contained in:
Stella Rouzi 2014-05-15 21:04:08 +03:00
parent 544146e7a9
commit e921e4da22

View file

@ -44,7 +44,7 @@ class Admin::RegistrationsController < ApplicationController
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), redirect_to(admin_conference_registrations_path(@conference.short_title),
:alert => 'Failed to update registration:' + e.message) alert: 'Failed to update registration:' + e.message)
return return
end end
end end
@ -123,12 +123,12 @@ class Admin::RegistrationsController < ApplicationController
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), redirect_to(admin_conference_registrations_path(@conference.short_title),
:alert => 'Failed to delete registration:' + e.message) alert: 'Failed to delete registration:' + e.message)
return return
end end
else else
redirect_to(admin_conference_registrations_path(@conference.short_title), redirect_to(admin_conference_registrations_path(@conference.short_title),
:alert => 'You must be an admin to delete a registration.') alert: 'You must be an admin to delete a registration.')
end end
end end
end end