app/services/dashboard/rescoping_service.rb
########################## FRIENDLY_ID_ENTRIES #########################
# find or create friendly_id entry for domain
FRIENDLY_ID_ENTRIES
find or create friendly_id entry for domain
FRIENDLY_ID_ENTRIES find or create friendly_id entry for domain
def domain_friendly_id(domain_fid_id_or_key)
      entry = FriendlyIdEntry.find_by_class_scope_and_key_or_slug(
        'Domain', nil, domain_fid_id_or_key
      )
      if entry.nil? && @service_user.present?
        domain = @service_user.identity.auth_domains.find do |d|
          d.name == domain_fid_id_or_key || d.id == domain_fid_id_or_key
        end
        if domain
          entry = FriendlyIdEntry.find_or_create_entry(
            'Domain', nil, domain.id, domain.attributes['name']
          )
        end
      end
      entry
    end
def domain_friendly_id ( domain_fid_id_or_key ) entry = FriendlyIdEntry . find_by_class_scope_and_key_or_slug ( 'Domain' , nil , domain_fid_id_or_key ) if entry . nil? && @service_user . present? domain = @service_user . identity . auth_domains . find do | d | d . name == domain_fid_id_or_key || d . id == domain_fid_id_or_key end if domain entry = FriendlyIdEntry . find_or_create_entry ( 'Domain' , nil , domain . id , domain . attributes [ 'name' ] ) end end entry end
FRIENDLY_ID_ENTRIES
find or create friendly_id entry for domain
FRIENDLY_ID_ENTRIES find or create friendly_id entry for domain
# try to find an entry by given fid or key
domain_fid_id_or_key
<not_specific>