Skip to content

Instantly share code, notes, and snippets.

@lenary
Created March 25, 2009 00:03
Show Gist options
  • Save lenary/84439 to your computer and use it in GitHub Desktop.
Save lenary/84439 to your computer and use it in GitHub Desktop.
class Attendee < ActiveRecord::Base
belongs_to :conference
has_many :submissions, :foreign_key => "presenter_id"
has_many :attendences, :foreign_key => "attendee_id", :class_name => "Submission"
end
Conference
has_many Sponsors
has_many Locations
has_many Tracks T(Locations)
has_many Schedulings T(Locations)
has_many Submissions
has_many Attendees
Sponsor
belongs_to Conference
Location
belongs_to Conference
has_many Tracks
has_many Schedulings T(Tracks)
Track
belongs_to Location
has_many Schedulings
Scheduling
belongs_to Track
belongs_to Submission
Attendee
belongs_to Conference
has_many Submissions
belongs_to Submissions
Submission
belongs_to Presenters (Attendees)
has_many Attendees
belongs_to Conference
has_one Scheduling
class Submission < ActiveRecord::Base
belongs_to :conference
has_one :scheduling
belongs_to :presenter, :class_name => "Attendee"
belongs_to :attendee
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment