module DogBiscuits::Actors::ApplyAuthorities
Private Instance Methods
add_new(authority_name, label)
click to toggle source
Add new term to the authority; it will be rejected if already present
@param auth [String] the authority to add to @param label [String] the label to add
# File lib/dog_biscuits/actors/apply_authorities.rb, line 25 def add_new(authority_name, label) DogBiscuits::Importers::Authority.new(authority_name).create_record(label) if Qa::Authorities::Local.subauthority_for(authority_name).search(label).empty? rescue Qa::InvalidSubAuthority Rails.logger.error("Invalid sub-authority: #{auth}") end