now you can not invite yourself. we have a bug as send_contact_request_to was taken out but Invitation still used it

This commit is contained in:
maxwell 2010-12-03 22:58:37 -08:00
parent 7dce94814c
commit c5f2e8bb2d

View file

@ -13,6 +13,7 @@ class Invitation
validates_presence_of :from, :to, :into
def self.invite(opts = {})
return false if opts[:email] == opts[:from].email
existing_user = User.find_by_email(opts[:email])
if existing_user
if opts[:from].contact_for(opts[:from].person)