summaryrefslogtreecommitdiff
path: root/app/controllers/projects/issues_controller.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2016-08-13 11:58:51 -0500
committerDouwe Maan <douwe@selenight.nl>2016-08-16 17:42:34 -0500
commit029b7d2e9266246feff2f165a10b16be1d7fe88e (patch)
tree41581f4e08043530161c95aef9ccb533ec58a5e7 /app/controllers/projects/issues_controller.rb
parentb2b1b4a4226267dbc442d62e19949909d9e58235 (diff)
downloadgitlab-ce-029b7d2e9266246feff2f165a10b16be1d7fe88e.tar.gz
Fixed specs and fixes based on failing specs
Diffstat (limited to 'app/controllers/projects/issues_controller.rb')
-rw-r--r--app/controllers/projects/issues_controller.rb8
1 files changed, 1 insertions, 7 deletions
diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb
index c8eda6b27f4..d0cc4b55467 100644
--- a/app/controllers/projects/issues_controller.rb
+++ b/app/controllers/projects/issues_controller.rb
@@ -176,12 +176,7 @@ class Projects::IssuesController < Projects::ApplicationController
protected
def issue
- @noteable = @issue ||=
- begin
- @project.issues.find_by!(iid: params[:id])
- rescue ActiveRecord::RecordNotFound
- redirect_old
- end
+ @noteable = @issue ||= @project.issues.find_by(iid: params[:id]) || redirect_old
end
alias_method :subscribable_resource, :issue
alias_method :issuable, :issue
@@ -225,7 +220,6 @@ class Projects::IssuesController < Projects::ApplicationController
if issue
redirect_to issue_path(issue)
- return
else
raise ActiveRecord::RecordNotFound.new
end