Q:

Unable to find rails association Model

I am attempting to do a query via a junction table, though Rails is given me the below error

Venue Model
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

Order Model
class Order < ActiveRecord::Base
  attr_accessible :fulfilled, :item, :placed, :person_id, :special_instructions, :priority, :flag, :milk

  belongs_to :person
  belongs_to :venue

Venues Orders Model
class VenuesOrders < ActiveRecord::Base
  attr_accessible :order_id, :venue_id
end

A:

class Venue < ActiveRecord::Base

  has_many :orders, through: :venues_orders
  has_many :venues_orders   

end

class Order < ActiveRecord::Base

  has_many :venues, through: :venues_orders
  has_many :venues_orders   

end

class VenuesOrders < ActiveRecord::Base
  belongs_to :venue
  belongs_to :order
end

For more details read : RailsGuides
Another advice: The convention for creating a join table is lexical ordering.  Like, OrdersVenues not VenuesOrders

