Sha256: 846a3e8dfbe49a37fe3174f97d4dd76fe1169183ba326f7c7e049dce63d52b72

Contents?: true

Size: 228 Bytes

Versions: 4

Compression:

Stored size: 228 Bytes

Contents

# frozen_string_literal: true

class Toy < ActiveRecord::Base
  self.primary_key = :toy_id
  belongs_to :pet

  has_many :sponsors, as: :sponsorable, inverse_of: :sponsorable

  scope :with_pet, -> { joins(:pet) }
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ibm_db-5.5.0-x86-mingw32 test/models/toy.rb
ibm_db-5.4.1-x86-mingw32 test/models/toy.rb
ibm_db-5.4.0-x86-mingw32 test/models/toy.rb
ibm_db-5.3.2-x86-mingw32 test/models/toy.rb