Sha256: b7866ee7c2fc398a02f0279c9901d40efc22cb621be9e8608814c3bb845ca7a6
Contents?: true
Size: 323 Bytes
Versions: 10
Compression:
Stored size: 323 Bytes
Contents
module Contacts extend ActiveSupport::Concern included do has_many :contacts, as: :contactable def get_primary_contact contacts.where(primary: true).first end def contact_widget "#{get_primary_contact.contact_type}: #{get_primary_contact.data}" if get_primary_contact end end end
Version data entries
10 entries across 10 versions & 2 rubygems