From 0c1298f2483bf2128171b772d536bcd565882cde Mon Sep 17 00:00:00 2001 From: Karel Picman Date: Wed, 23 Aug 2017 08:17:45 +0200 Subject: [PATCH] #749 accept project's identifier too --- app/controllers/dmsf_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/dmsf_controller.rb b/app/controllers/dmsf_controller.rb index ac639b34..5baaa487 100644 --- a/app/controllers/dmsf_controller.rb +++ b/app/controllers/dmsf_controller.rb @@ -616,7 +616,8 @@ class DmsfController < ApplicationController def find_folder_by_title # find by title has to be scoped to project - @folder = DmsfFolder.find_by(title: params[:folder_title], project_id: params[:id]) if params[:folder_title].present? + project = Project.find(params[:id]) + @folder = DmsfFolder.find_by(title: params[:folder_title], project_id: project.id) if params[:folder_title].present? rescue DmsfAccessError render_403 rescue ActiveRecord::RecordNotFound