私のユースケースは単純です。これが私のモデルです。
Auction
===============
id
name
expiration_date
AuctionImage
===============
id
auction_id
image_path
filesize
Auctions
少なくとも 1 を持つものをすべて取得しAuctionImage
、 で並べ替えたいと思いexpiration_date
ます。
class Auction < ActiveRecord::Base
has_many :auction_images
end
class AuctionImage < ActiveRecord::Base
belongs_to :auction
end
助言がありますか?