updates from production: fix user.time_zone, precompile assets

This commit is contained in:
Lee Lawlor
2014-09-26 13:47:57 -04:00
parent 85056c9d17
commit cc7114f37e
12 changed files with 116 additions and 14 deletions

View File

@ -56,6 +56,9 @@ class User < ActiveRecord::Base
cattr_reader :per_page
@@per_page = 50
# get the user's time zone or UTC time
def time_zone_or_utc; time_zone || 'UTC'; end
# true if the user has used the maximum number of available timecontrols
def max_timecontrols?
self.timecontrols.roots.count >= Timecontrol::MAX_PER_USER