Sha256: 74d5a1045a8fea845e58cdab0d78a6ea29cc7993c4dcb71cd709fc34135be14e

Contents?: true

Size: 464 Bytes

Versions: 1

Compression:

Stored size: 464 Bytes

Contents

# frozen_string_literal: true

class Tramway::Profiles::SocialNetwork < ::Tramway::Core::ApplicationRecord
  belongs_to :record, polymorphic: true, required: false

  enumerize :network_name, in: %i[vk facebook twitter instagram telegram patreon]
  enumerize :record_type, in: ((['Tramway::SportSchool::Institution', 'Tramway::Conference::Unity'].map do |type|
    type if const_defined?(type)
  end + [Tramway::Core.application_object&.model_class]).compact)
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tramway-profiles-1.3.2.1 app/models/tramway/profiles/social_network.rb