Skip to content

Instantly share code, notes, and snippets.

@fteem
Created December 1, 2011 17:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fteem/1418328 to your computer and use it in GitHub Desktop.
Save fteem/1418328 to your computer and use it in GitHub Desktop.
activerecord vs datamapper
ActiveRecord Terminology DataMapper Terminology
has_many has n
has_one has 1
belongs_to belongs_to
has_and_belongs_to_many has n, :things, :through => Resource
has_many :association, :through => Model has n, :things, :through => :model
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment