我有预订模式和用户模型。
class Booking < ActiveRecord::Base
belongs_to :buyer, class_name: "User"
belongs_to :seller, class_name: "User"
end
这是我的User.rb
class User < ActiveRecord::Base
has_many :bookings, foreign_key: "WHAT_SHOULD_I_GIVE_HERE", dependent: :destroy
end
在User.rb中,我怎么能提到&#39; seller_id&#39;和&#39; buyer_id&#39;是foreign_keys吗?