Send notifiation on create UserProject relation (access granted)

This commit is contained in:
Alex Denisov 2012-08-27 00:13:03 +03:00
parent 2c32574ac3
commit aaeb37419a
6 changed files with 78 additions and 0 deletions

View file

@ -76,6 +76,13 @@ class Notify < ActionMailer::Base
mail(to: recipient(recipient_id), subject: subject("changed issue ##{@issue.id}", @issue.title))
end
def project_access_granted_email(user_project_id)
@users_project = UsersProject.find user_project_id
@project = @users_project.project
mail(to: @users_project.user.email,
subject: subject("access to project was granted"))
end
private
# Look up a User by their ID and return their email address