Ruby on Rails
has_many

The has_many association provides a way to access a one way relation between two tables.

Examples of this:

Example Forum

See ForumExample.

See Also

Notes

The finder_sql option in has_many should be in single quotes if you want inline variables (e.g. ‘SELECT * FROM something WHERE user_id = #{id}’) to be evaluated properly!