Use @conference for current_conference if available

This means the top menu would work on the conferences#show page.
This commit is contained in:
Andrew Radev 2015-07-26 14:39:50 +03:00
parent 36d27ad3a8
commit 752fc6262a
1 changed files with 6 additions and 2 deletions

View File

@ -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