Commit 267bd6068c7a57316ef357f9385e12fea6c8d69f
Exists in
master
and in
4 other branches
Merge branch 'issue-101' into dev
Showing
4 changed files
with
6 additions
and
1 deletions
Show diff stats
Gemfile
@@ -28,6 +28,7 @@ group :assets do | @@ -28,6 +28,7 @@ group :assets do | ||
28 | end | 28 | end |
29 | 29 | ||
30 | group :development do | 30 | group :development do |
31 | + gem 'letter_opener' | ||
31 | gem 'rails-footnotes', '>= 3.7.5.rc4' | 32 | gem 'rails-footnotes', '>= 3.7.5.rc4' |
32 | gem 'annotate', :git => 'git://github.com/ctran/annotate_models.git' | 33 | gem 'annotate', :git => 'git://github.com/ctran/annotate_models.git' |
33 | end | 34 | end |
Gemfile.lock
@@ -119,6 +119,8 @@ GEM | @@ -119,6 +119,8 @@ GEM | ||
119 | rails (>= 3.0.0) | 119 | rails (>= 3.0.0) |
120 | launchy (2.0.5) | 120 | launchy (2.0.5) |
121 | addressable (~> 2.2.6) | 121 | addressable (~> 2.2.6) |
122 | + letter_opener (0.0.2) | ||
123 | + launchy | ||
122 | libv8 (3.3.10.2) | 124 | libv8 (3.3.10.2) |
123 | linecache19 (0.5.12) | 125 | linecache19 (0.5.12) |
124 | ruby_core_source (>= 0.1.4) | 126 | ruby_core_source (>= 0.1.4) |
@@ -262,6 +264,7 @@ DEPENDENCIES | @@ -262,6 +264,7 @@ DEPENDENCIES | ||
262 | jquery-rails | 264 | jquery-rails |
263 | kaminari | 265 | kaminari |
264 | launchy | 266 | launchy |
267 | + letter_opener | ||
265 | pygments.rb (= 0.2.3) | 268 | pygments.rb (= 0.2.3) |
266 | rails (= 3.1.0) | 269 | rails (= 3.1.0) |
267 | rails-footnotes (>= 3.7.5.rc4) | 270 | rails-footnotes (>= 3.7.5.rc4) |
app/controllers/issues_controller.rb
@@ -41,7 +41,7 @@ class IssuesController < ApplicationController | @@ -41,7 +41,7 @@ class IssuesController < ApplicationController | ||
41 | def create | 41 | def create |
42 | @issue = @project.issues.new(params[:issue]) | 42 | @issue = @project.issues.new(params[:issue]) |
43 | @issue.author = current_user | 43 | @issue.author = current_user |
44 | - if @issue.save | 44 | + if @issue.save && @issue.assignee != current_user |
45 | Notify.new_issue_email(@issue).deliver | 45 | Notify.new_issue_email(@issue).deliver |
46 | end | 46 | end |
47 | 47 |
config/environments/development.rb
@@ -29,4 +29,5 @@ Gitlab::Application.configure do | @@ -29,4 +29,5 @@ Gitlab::Application.configure do | ||
29 | config.assets.debug = true | 29 | config.assets.debug = true |
30 | 30 | ||
31 | config.action_mailer.default_url_options = { :host => 'localhost:3000' } | 31 | config.action_mailer.default_url_options = { :host => 'localhost:3000' } |
32 | + config.action_mailer.delivery_method = :letter_opener | ||
32 | end | 33 | end |