Topic: help with one-to-one relationship
Hi, please could someone help me with this basic problem:
I have 2 tables, weddings, and continents. Continents is a lookup table that contains 7 continents.
I basically want to return a list of all weddings in a particular continent, by continent name.
@wedding = Wedding.continents.find(:all, :conditions => "continent = 'Africa'")
But i get the error:
undefined method `continents' for Wedding:Class
Why is this?
class Wedding < ActiveRecord::Base
class Continent < ActiveRecord::Base