added User#can_export?

This commit is contained in:
Georg G 2016-01-05 20:54:13 +01:00
parent a13d2443bd
commit bf64a59649

View file

@ -251,4 +251,8 @@ class User < ActiveRecord::Base
self.update(permanently_banned: false, banned_until: buntil, ban_reason: reason)
end
end
def can_export?
!self.export_processing? && !self.export_created_at.nil? && Time.now > self.export_created_at.in(1.week)
end
end