Merge pull request #13 from differentreality/event_registration
Event registration
This commit is contained in:
commit
00af4e0aee
7 changed files with 29 additions and 2 deletions
|
|
@ -2,7 +2,7 @@ class Event < ActiveRecord::Base
|
|||
include ActiveRecord::Transitions
|
||||
has_paper_trail
|
||||
attr_accessible :title, :subtitle, :abstract, :description, :event_type_id, :people_attributes, :person,
|
||||
:proposal_additional_speakers, :track_id, :video_id, :video_type
|
||||
:proposal_additional_speakers, :track_id, :video_id, :video_type, :require_registration
|
||||
acts_as_commentable
|
||||
|
||||
has_many :event_people, :dependent => :destroy
|
||||
|
|
@ -10,6 +10,8 @@ class Event < ActiveRecord::Base
|
|||
has_many :people, :through => :event_people
|
||||
has_many :speakers, :through => :event_people, :source => :person, :conditions => {"event_people.event_role" => "speaker"}
|
||||
belongs_to :event_type
|
||||
|
||||
has_and_belongs_to_many :registrations
|
||||
|
||||
belongs_to :track
|
||||
belongs_to :room
|
||||
|
|
|
|||
|
|
@ -5,10 +5,12 @@ class Registration < ActiveRecord::Base
|
|||
|
||||
has_one :supporter_registration
|
||||
has_and_belongs_to_many :social_events
|
||||
has_and_belongs_to_many :events
|
||||
|
||||
attr_accessible :person_id, :conference_id, :attending_social_events, :attending_with_partner,
|
||||
:using_affiliated_lodging, :arrival, :departure, :person_attributes, :other_dietary_choice, :dietary_choice_id,
|
||||
:handicapped_access_required, :supporter_registration_attributes, :social_event_ids, :other_special_needs
|
||||
:handicapped_access_required, :supporter_registration_attributes, :social_event_ids, :other_special_needs,
|
||||
:event_ids
|
||||
|
||||
accepts_nested_attributes_for :person
|
||||
accepts_nested_attributes_for :supporter_registration
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue