diff options
Diffstat (limited to 'app/controllers/context_menus_controller.rb')
-rw-r--r-- | app/controllers/context_menus_controller.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/controllers/context_menus_controller.rb b/app/controllers/context_menus_controller.rb index 1fd34aabd..f4ecb9547 100644 --- a/app/controllers/context_menus_controller.rb +++ b/app/controllers/context_menus_controller.rb @@ -95,4 +95,17 @@ class ContextMenusController < ApplicationController render :layout => false end + + def projects + @projects = Project.where(id: params[:ids]).to_a + if @projects.empty? + render_404 + return + end + + if @projects.size == 1 + @project = @projects.first + end + render layout: false + end end |