Skip to content

Commit

Permalink
fix #245
Browse files Browse the repository at this point in the history
Signed-off-by: Kirill Mokevnin <mokevnin@gmail.com>
  • Loading branch information
mokevnin committed Jul 28, 2021
1 parent ccf43bc commit 6f8234f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/web/resumes_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def index
end

def show
@resume = Resume.find(params[:id])
@resume = Resume.web.find(params[:id])
authorize @resume

@resume_answers = @resume.answers.includes(:comments).order(likes_count: :desc)
Expand Down
2 changes: 2 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ class Application < Rails::Application
# Use the responders controller from the responders gem
config.app_generators.scaffold_controller :responders_controller

config.action_dispatch.rescue_responses['Pundit::NotAuthorizedError'] = :forbidden

# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 6.1
config.exceptions_app = routes
Expand Down

0 comments on commit 6f8234f

Please sign in to comment.