Permalink
Browse files

Merge branch 'master' of github.com:railsmachine/xtt

  • Loading branch information...
2 parents 99d4998 + dfe92e8 commit 96f6d83682913742a4246c4f07a5031827e61513 @skalnik skalnik committed Jun 28, 2010
Showing with 5 additions and 6 deletions.
  1. +4 −5 app/models/job/user_inviter.rb
  2. +1 −1 app/models/user/inviter.rb
@@ -1,14 +1,13 @@
class Job::UserInviter < Job::Base.new(:project, :user)
def perform
- case user.class.name
- when 'User'
+ if user.is_a? User
User::Mailer.deliver_project_invitation project, user
- when 'Invitation'
+ elsif user.is_a? Invitation
User::Mailer.deliver_new_invitation project, user
else
- raise "Unsupported invitation type '#{user.class.name}'"
+ raise "Unsupported invitation type '#{user.class}'"
end
end
-end
+end
@@ -62,4 +62,4 @@ def parse(string)
@logins << s if s =~ User.login_format
end
end
-end
+end

0 comments on commit 96f6d83

Please sign in to comment.