module UserTimeZone::Controller
Protected Instance Methods
user_for_time_zone()
click to toggle source
# File lib/user_time_zone/controller.rb, line 10 def user_for_time_zone current_user end
with_user_time_zone(&block)
click to toggle source
# File lib/user_time_zone/controller.rb, line 5 def with_user_time_zone(&block) zone = user_for_time_zone.time_zone.presence Time.use_zone(zone, &block) end