From 752fc6262aa26aaf066de8cdb6f722d2bffd5d29 Mon Sep 17 00:00:00 2001 From: Andrew Radev Date: Sun, 26 Jul 2015 14:39:50 +0300 Subject: [PATCH] Use @conference for current_conference if available This means the top menu would work on the conferences#show page. --- app/controllers/management/management_controller.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/controllers/management/management_controller.rb b/app/controllers/management/management_controller.rb index aa98b89..cefbbaf 100644 --- a/app/controllers/management/management_controller.rb +++ b/app/controllers/management/management_controller.rb @@ -12,8 +12,12 @@ module Management helper_method :current_conference? def current_conference - if not @current_conference and params[:conference_id].present? - @current_conference = Conference.find(params[:conference_id]) + if not @current_conference + if @conference + @current_conference = @conference + elsif params[:conference_id].present? + @current_conference = Conference.find(params[:conference_id]) + end end @current_conference