Module: ApplicationUserTimeZoneConcern

Extended by:
ActiveSupport::Concern
Included in:
ApplicationController
Defined in:
app/controllers/concerns/application_user_time_zone_concern.rb

Instance Method Summary collapse

Instance Method Details

#set_time_zone(&block) ⇒ Object (protected)

Set the time_zone for current request.


12
13
14
# File 'app/controllers/concerns/application_user_time_zone_concern.rb', line 12

def set_time_zone(&block) # rubocop:disable Naming/AccessorMethodName
  Time.use_zone(current_user.time_zone, &block)
end