show current day's schedule

This commit is contained in:
differentreality 2013-07-29 02:01:24 +03:00
parent f905bb8f8f
commit adb04ab82e
2 changed files with 5 additions and 1 deletions

View file

@ -7,6 +7,10 @@ class ScheduleController < ApplicationController
@rooms = @conference.rooms
@events = @conference.events
@dates = @conference.start_date..@conference.end_date
if @dates === Date.current
@today = Date.current.strftime("%Y-%m-%d")
end
end
end

View file

@ -116,7 +116,7 @@ $(function() {
if (activeTab.length) {
activeTab.tab('show');
} else {
$('.nav-tabs a:first').tab('show');
$('.nav-tabs a[href=#<%= j @today %>]').tab('show');
}
});
});