Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com>2011-10-09 01:36:38 +0400
committerDmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com>2011-10-09 01:36:38 +0400
commite98c77857f9f765d1854b92c2dc33049504a596d (patch)
tree52fbfc1cdb55df21843965479c97be0c91121a9a /app/mailers
parent0f43e98ef8c2da8908b1107f75b67cda2572c2c4 (diff)
init commitv0.9.4
Diffstat (limited to 'app/mailers')
-rw-r--r--app/mailers/.gitkeep0
-rw-r--r--app/mailers/notify.rb41
2 files changed, 41 insertions, 0 deletions
diff --git a/app/mailers/.gitkeep b/app/mailers/.gitkeep
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/app/mailers/.gitkeep
diff --git a/app/mailers/notify.rb b/app/mailers/notify.rb
new file mode 100644
index 00000000000..56e4de9b392
--- /dev/null
+++ b/app/mailers/notify.rb
@@ -0,0 +1,41 @@
+class Notify < ActionMailer::Base
+ default_url_options[:host] = "gitlabhq.com"
+ default from: "notify@gitlabhq.com"
+
+ def new_user_email(user, password)
+ @user = user
+ @password = password
+ mail(:to => @user.email, :subject => "gitlab | Account was created for you")
+ end
+
+ def new_issue_email(issue)
+ @user = issue.assignee
+ @project = issue.project
+ @issue = issue
+
+ mail(:to => @user.email, :subject => "gitlab | New Issue was created")
+ end
+
+ def note_wall_email(user, note)
+ @user = user
+ @note = note
+ @project = note.project
+ mail(:to => @user.email, :subject => "gitlab | #{@note.project.name} ")
+ end
+
+ def note_commit_email(user, note)
+ @user = user
+ @note = note
+ @project = note.project
+ @commit = @project.repo.commits(note.noteable_id).first
+ mail(:to => @user.email, :subject => "gitlab | #{@note.project.name} ")
+ end
+
+ def note_issue_email(user, note)
+ @user = user
+ @note = note
+ @project = note.project
+ @issue = note.noteable
+ mail(:to => @user.email, :subject => "gitlab | #{@note.project.name} ")
+ end
+end