Refactor status form #2623

This commit is contained in:
Martin Lensment 2015-06-16 16:16:09 +03:00
parent 9b9e1a3068
commit 238b3aa5e0
4 changed files with 7 additions and 6 deletions

View file

@ -317,7 +317,7 @@ class Domain < ActiveRecord::Base
end
def force_deletable?
domain_statuses.where(value: DomainStatus::FORCE_DELETE).empty?
!statuses.include?(DomainStatus::FORCE_DELETE)
end
def registrant_verification_asked?

View file

@ -124,7 +124,7 @@ class DomainStatus < ActiveRecord::Base
end
def statuses_for_admin
SERVER_STATUSES.map { |x| x.sub('server', '') }
SERVER_STATUSES.map { |x| [x.sub('server', ''), x] }
end
end
end