InvitationsController update has an error, and our non-specific error catching is messing up knowing what our problems are

This commit is contained in:
Raphael Sofaer 2011-08-11 14:50:43 -07:00
parent 78a637f251
commit d9904ecd30

View file

@ -55,6 +55,7 @@ class InvitationsController < Devise::InvitationsController
user.accept_invitation!(params[:user])
user.seed_aspects
rescue Exception => e #What exception is this trying to rescue? If it is ActiveRecord::NotFound, we should say so.
raise e unless e.respond_to?(:record)
user = nil
record = e.record
record.errors.delete(:person)