Use @conference for current_conference if available
This means the top menu would work on the conferences#show page.
This commit is contained in:
parent
36d27ad3a8
commit
752fc6262a
|
@ -12,9 +12,13 @@ module Management
|
||||||
helper_method :current_conference?
|
helper_method :current_conference?
|
||||||
|
|
||||||
def current_conference
|
def current_conference
|
||||||
if not @current_conference and params[:conference_id].present?
|
if not @current_conference
|
||||||
|
if @conference
|
||||||
|
@current_conference = @conference
|
||||||
|
elsif params[:conference_id].present?
|
||||||
@current_conference = Conference.find(params[:conference_id])
|
@current_conference = Conference.find(params[:conference_id])
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
@current_conference
|
@current_conference
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue