lib/peer_review.rb
# Checks if the input string represents a research domain
Checks if the input string represents a research domain
Checks if the input string represents a research domain
def valid?
    return false unless domain && domain.valid?
    rule = PeerReview.list.find(to_s)
    !rule.nil? && rule.type != :exception && rule.allow?(".#{domain}")
  end
def valid? return false unless domain && domain . valid? rule = PeerReview . list . find ( to_s ) ! rule . nil? && rule . type != :exception && rule . allow? ( ".#{domain}" ) end
Checks if the input string represents a research domain
Checks if the input string represents a research domain
# Ensure it's a valid domain # check using public suffix's standard logic # domain is on the domain list and # domain is not explicitly blacklisted and # domain matches a standard public suffix list rule