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,8 +12,12 @@ 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
|
||||||
@current_conference = Conference.find(params[:conference_id])
|
if @conference
|
||||||
|
@current_conference = @conference
|
||||||
|
elsif params[:conference_id].present?
|
||||||
|
@current_conference = Conference.find(params[:conference_id])
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@current_conference
|
@current_conference
|
||||||
|
|
Loading…
Reference in New Issue