55f9b8129a
Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
8 lines
424 B
Ruby
8 lines
424 B
Ruby
class Sponsor < ActiveRecord::Base
|
|
belongs_to :sponsor_club, class_name: "Club", foreign_key: "club_id"
|
|
belongs_to :sponsorable, 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
|