Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class User < ActiveRecord::Base
- has_many :authentications
- has_many :attendees
- has_many :distances
- has_many :events, :through => :distances
- has_many :events, :through => :attendees
- has_many :events
- belongs_to :role
- has_many :comments
- end
- class Event < ActiveRecord::Base
- has_event_calendar :start_at_field => 'start', :end_at_field => 'end'
- has_many :distances
- has_many :users, :through => :distances
- belongs_to :user
- belongs_to :event_type
- has_many :attendees
- has_many :users, :through => :attendees
- has_many :comments
- end
- class Attendee < ActiveRecord::Base
- belongs_to :user
- belongs_to :event
- validates_uniqueness_of :user_id, :scope => :event_id
- end
Add Comment
Please, Sign In to add comment