Skip to content

Instantly share code, notes, and snippets.

@lpradovera
Created November 9, 2010 14:07
Show Gist options
  • Save lpradovera/669110 to your computer and use it in GitHub Desktop.
Save lpradovera/669110 to your computer and use it in GitHub Desktop.
class Language < ActiveRecord::Base
set_table_name 'tab_lingue'
set_primary_key 'id'
has_and_belongs_to_many :persons, {
:join_table => "persone_x_tab_lingue",
:foreign_key => "tab_lingue_id",
:association_foreign_key => "persone_id"
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment