Sha256: e971d6670e88a22639ef532b8bf0ce77c1641f7e2cb4be45e73fe047ceab9d3f
Contents?: true
Size: 506 Bytes
Versions: 4
Compression:
Stored size: 506 Bytes
Contents
# frozen_string_literal: true class Sponsor < ActiveRecord::Base belongs_to :sponsor_club, class_name: "Club", foreign_key: "club_id" belongs_to :sponsorable, polymorphic: true belongs_to :sponsor, polymorphic: true belongs_to :thing, polymorphic: true, foreign_type: :sponsorable_type, foreign_key: :sponsorable_id belongs_to :sponsorable_with_conditions, -> { where name: "Ernie" }, polymorphic: true, foreign_type: "sponsorable_type", foreign_key: "sponsorable_id" end
Version data entries
4 entries across 4 versions & 1 rubygems