我的Rails應用程序ConfirmRequest.rb和Booking.rb中有兩個模型。 這些模型相互關聯與此CONFIGRATION:根據關聯表中的數據進行有效的記錄查詢
class ConfirmRequest < ActiveRecord::Base
has_one :booking
end
class Booking < ActiveRecord::Base
belongs_to :confirm_request
end
所以,我想定義2個變量首先它包含了其預訂已經創建和其他尚未創建其預定的confirm_requests我怎樣才能在rails中定義這些變量?