From 7fa90d3427d00ecceb4c7f06628e2bbd0aa192d9 Mon Sep 17 00:00:00 2001 From: Toru Takahashi Date: Wed, 23 May 2018 03:55:42 +0900 Subject: [PATCH] [bugfix]for category controller, before calling authorize, should call find_project --- app/controllers/glossary_categories_controller.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/glossary_categories_controller.rb b/app/controllers/glossary_categories_controller.rb index d4753dc..02eb7f5 100644 --- a/app/controllers/glossary_categories_controller.rb +++ b/app/controllers/glossary_categories_controller.rb @@ -1,8 +1,7 @@ class GlossaryCategoriesController < ApplicationController - before_action :authorize before_action :find_category_from_id, only: [:show, :edit, :update, :destroy] - before_action :find_project_from_id + before_action :find_project_from_id, :authorize def index @categories = GlossaryCategory.where(project_id: @project.id)