mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
812469943c
fixes #10016
5 lines
152 B
Ruby
5 lines
152 B
Ruby
class Owner < ActiveRecord::Base
|
|
self.primary_key = :owner_id
|
|
has_many :pets, -> { order 'pets.name desc' }
|
|
has_many :toys, :through => :pets
|
|
end
|