Added test for RootRouteConstraint and conferences#current

This commit is contained in:
divyanshumehta 2017-03-19 09:17:31 +05:30
parent 529b8eb710
commit ee7684d845
5 changed files with 60 additions and 5 deletions

View file

@ -12,7 +12,7 @@ class ConferencesController < ApplicationController
def show; end
def current
current = Conference.first
current = Conference.where('start_date <= ? AND end_date >= ?', Date.current, Date.current).first
redirect_to conference_path(current.short_title)
end