Sha256: febe4f8ada7b6926d2e9dd8c27b43bf490c341177adb708e6c92d74b2f6a8d0b
Contents?: true
Size: 503 Bytes
Versions: 2
Compression:
Stored size: 503 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.try(:model_class) || Tramway::Core.application_object]).compact end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tramway-profiles-1.3.2.4 | app/models/tramway/profiles/social_network.rb |
tramway-profiles-1.3.2.3 | app/models/tramway/profiles/social_network.rb |