mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 22:54:47 +02:00
Merge branch 'master' into refactor-messages
# Conflicts: # db/structure.sql
This commit is contained in:
commit
aff5b68a2f
29 changed files with 297 additions and 93 deletions
|
@ -4,6 +4,7 @@ class Domain < ActiveRecord::Base
|
|||
include Concerns::Domain::Expirable
|
||||
include Concerns::Domain::Activatable
|
||||
include Concerns::Domain::ForceDelete
|
||||
include Concerns::Domain::Discardable
|
||||
include Concerns::Domain::Deletable
|
||||
include Concerns::Domain::Transferable
|
||||
|
||||
|
@ -249,13 +250,6 @@ class Domain < ActiveRecord::Base
|
|||
true
|
||||
end
|
||||
|
||||
def delete_candidateable?
|
||||
return false if delete_at > Time.zone.now
|
||||
return false if statuses.include?(DomainStatus::DELETE_CANDIDATE)
|
||||
return false if statuses.include?(DomainStatus::SERVER_DELETE_PROHIBITED)
|
||||
true
|
||||
end
|
||||
|
||||
def renewable?
|
||||
if Setting.days_to_renew_domain_before_expire != 0
|
||||
# if you can renew domain at days_to_renew before domain expiration
|
||||
|
@ -613,10 +607,6 @@ class Domain < ActiveRecord::Base
|
|||
where("#{attribute_alias(:outzone_time)} < ?", Time.zone.now)
|
||||
end
|
||||
|
||||
def self.delete_candidates
|
||||
where("#{attribute_alias(:delete_time)} < ?", Time.zone.now)
|
||||
end
|
||||
|
||||
def self.uses_zone?(zone)
|
||||
exists?(["name ILIKE ?", "%.#{zone.origin}"])
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue