class RailsBase::Configuration::User

Constants

ACCEPTED_TIMEZONES
ACTIVE_SUPPORT_MAPPING
DEFAULT_TIMEZONES
DEFAULT_VALUES
USER_DEFINED_KEY
USER_DEFINED_ZONE

Public Instance Methods

_timezone_convenience() click to toggle source
# File lib/rails_base/configuration/user.rb, line 31
def _timezone_convenience
  value = ACCEPTED_TIMEZONES[timezone]
  self.class.define_method('user_timezone') do |user|
    value.call(user) || ActiveSupport::TimeZone::MAPPING['UTC']
  end

  self.class.define_method('tz_user_defined?') do
    timezone == USER_DEFINED_KEY
  end
end