mirror of
https://github.com/internetee/registry.git
synced 2025-07-21 18:26:06 +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
|
||||
|
||||
|
|
|
@ -283,16 +283,6 @@ class Domain < ActiveRecord::Base
|
|||
domain_transfers.find_by(status: DomainTransfer::PENDING)
|
||||
end
|
||||
|
||||
def expirable?
|
||||
return false if valid_to > Time.zone.now
|
||||
|
||||
if statuses.include?(DomainStatus::EXPIRED) && outzone_at.present? && delete_at.present?
|
||||
return false
|
||||
end
|
||||
|
||||
true
|
||||
end
|
||||
|
||||
def server_holdable?
|
||||
return false if statuses.include?(DomainStatus::SERVER_HOLD)
|
||||
return false if statuses.include?(DomainStatus::SERVER_MANUAL_INZONE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue