convert timezone to conference`s timezone
This commit is contained in:
parent
61930f8572
commit
4a974e29b3
2 changed files with 8 additions and 8 deletions
|
|
@ -7,14 +7,6 @@ module Admin
|
|||
|
||||
before_action :get_event, except: [:index, :create, :reports]
|
||||
|
||||
# FIXME: The timezome should only be applied on output, otherwise
|
||||
# you get lost in timezone conversions...
|
||||
# around_filter :set_timezone_for_this_request
|
||||
|
||||
def set_timezone_for_this_request(&block)
|
||||
Time.use_zone(@conference.timezone, &block)
|
||||
end
|
||||
|
||||
def index
|
||||
@events = @program.events
|
||||
@tracks = @program.tracks
|
||||
|
|
|
|||
|
|
@ -3,6 +3,14 @@ class SchedulesController < ApplicationController
|
|||
before_action :respond_to_options
|
||||
load_and_authorize_resource :conference, find_by: :short_title
|
||||
load_resource :program, through: :conference, singleton: true, except: :index
|
||||
around_action :use_timezone_for_this_request
|
||||
|
||||
# FIXME: The timezome should only be applied on output, otherwise
|
||||
# you get lost in timezone conversions...
|
||||
|
||||
def use_timezone_for_this_request(&block)
|
||||
Time.use_zone(@conference.timezone, &block)
|
||||
end
|
||||
|
||||
def show
|
||||
@rooms = @conference.venue.rooms if @conference.venue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue