summaryrefslogtreecommitdiff
path: root/app/mailers/emails/projects.rb
blob: 4d5fe9ef6142858ca51797ff56d3e9d5c7d9b05e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
module Emails
  module Projects
    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

    def project_was_moved_email(project_id, user_id)
      @user = User.find user_id
      @project = Project.find project_id
      mail(to: @user.email,
           subject: subject("project was moved"))
    end
  end
end