From c3ac72f0af0852591171168e34c66ad2089431fb Mon Sep 17 00:00:00 2001 From: divyanshumehta Date: Sat, 11 Feb 2017 16:45:27 +0530 Subject: [PATCH] Issue #1259 --- app/controllers/conferences_controller.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/controllers/conferences_controller.rb b/app/controllers/conferences_controller.rb index 53e5bd6d..01a65e0f 100644 --- a/app/controllers/conferences_controller.rb +++ b/app/controllers/conferences_controller.rb @@ -6,6 +6,9 @@ class ConferencesController < ApplicationController def index @current = Conference.where('end_date >= ?', Date.current).reorder(start_date: :asc) + if @current.count == 1 + redirect_to "/conferences/#{@current.first.id}" + end @antiquated = @conferences - @current end