Associations are a set of macro-like class methods for tying objects together through foreign keys. They express relationships like "Project has one Project Manager" or "Project belongs to a Portfolio". Each macro adds a number of methods to the class which are specialized according to the collection or association symbol and the options hash. It works much the same was as Ruby's own attr* methods.

* [[belongs_to]]
* [[has_one]]
* [[has_many]]
* [[has_and_belongs_to_many]]

h2. Examples

* "CheatSheet [pdf]":http://www.slash7.com/cheats/activerecord_cheatsheet.pdf from "(24)Slash7":http://www.slash7.com
* ForumExample: Demonstrates the use of *@has_one@*, *@has_many@*, and *@belongs_to@*.
* AccessControlListExample: Demonstrates the use of *@has_and_belongs_to_many@*.
* ActiveRecordAssociations (Pretty Picture)

h2. Documentation

* "API Documentation":http://rails.rubyonrails.com/classes/ActiveRecord/Associations/ClassMethods.html

<hr />
*Questions:*
*Q:* _Quick question: is there any way to create associations using multi-column primary keys in PostgreSQL?_
*A:* Rails only recognized one field for a primary key. Maybe you can use a pg View to work around this?
*C:* _Thanks very much, that works quite well._
