mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 08:22:05 +02:00
parent
14c5c3efed
commit
0cc3a53deb
3 changed files with 26 additions and 30 deletions
|
@ -12,17 +12,17 @@ module Concerns::Domain::Expirable
|
|||
end
|
||||
|
||||
def registered?
|
||||
valid_to >= Time.zone.now
|
||||
!expired?
|
||||
end
|
||||
|
||||
def expired?
|
||||
statuses.include?(DomainStatus::EXPIRED)
|
||||
expire_time <= Time.zone.now
|
||||
end
|
||||
|
||||
def expirable?
|
||||
return false if valid_to > Time.zone.now
|
||||
|
||||
if expired? && outzone_at.present? && delete_at.present?
|
||||
if statuses.include?(DomainStatus::EXPIRED) && outzone_at.present? && delete_at.present?
|
||||
return false
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue