我試圖去做通過路口表的查詢,但Rails的是給我下面的錯誤無法找到軌關聯模型
場館模型
class Venue < ActiveRecord::Base
attr_accessible :address, :latitude, :longitude, :name, :phone, :suburb, :state, :country
after_validation :geocode
has_many :orders, through: :venues_orders
geocoded_by :full_address
def full_address
[address, suburb, state, country].compact.join(', ')
end
end
訂貨型號
class Order < ActiveRecord::Base
attr_accessible :fulfilled, :item, :placed, :person_id, :special_instructions, :priority, :flag, :milk
belongs_to :person
belongs_to :venue
場地指令模型
class VenuesOrders < ActiveRecord::Base
attr_accessible :order_id, :venue_id
end
你是不正確 – Emu