Skip to content

Commit 38244ac

Browse files
committed
Don't catch require_ownership exceptions so we can see error in prod logs
1 parent 3b84989 commit 38244ac

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

app/controllers/concerns/has_ownership.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ def owner # TODO: is this even used?
1919
def require_ownership
2020
model = content_type_from_controller(self.class)
2121
redirect_if_not_owned model.find(params[:id]), send(redirect_path)
22-
rescue
23-
redirect_to '/500' unless Rails.env.development?
22+
# rescue
23+
# redirect_to '/500' unless Rails.env.development?
2424
end
2525

2626
# Unless this content is shared, ensure only the owner can do this action

app/controllers/content_controller.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ class ContentController < ApplicationController
33

44
before_action :authenticate_user!, only: [:new, :create, :edit, :update, :destroy]
55

6-
# TODO: put a lot of this in ContentManagementService
7-
86
def index
97
@content = content_type_from_controller(self.class)
108
.where(user_id: current_user.id)

0 commit comments

Comments
 (0)