Adding more registration options, and starting work on supporter levels
This commit is contained in:
parent
61a02d17a3
commit
973913b3bf
25 changed files with 228 additions and 20 deletions
|
|
@ -1,12 +1,15 @@
|
|||
class Conference < ActiveRecord::Base
|
||||
attr_accessible :title, :short_title, :social_tag, :contact_email, :timezone, :html_export_path,
|
||||
:start_date, :end_date, :rooms_attributes, :tracks_attributes,
|
||||
:start_date, :end_date, :rooms_attributes, :tracks_attributes, :dietary_choices_attributes,
|
||||
:use_dietary_choices, :use_supporter_levels, :supporter_levels_attributes,
|
||||
:event_types_attributes, :registration_start_date, :registration_end_date, :logo
|
||||
|
||||
has_paper_trail
|
||||
|
||||
has_one :email_settings, :dependent => :destroy
|
||||
has_one :call_for_papers, :dependent => :destroy
|
||||
has_many :supporter_levels, :dependent => :destroy
|
||||
has_many :dietary_choices, :dependent => :destroy
|
||||
has_many :events, :dependent => :destroy
|
||||
has_many :event_types, :dependent => :destroy
|
||||
has_many :tracks, :dependent => :destroy
|
||||
|
|
@ -18,6 +21,8 @@ class Conference < ActiveRecord::Base
|
|||
accepts_nested_attributes_for :rooms, :reject_if => proc {|r| r["name"].blank?}, :allow_destroy => true
|
||||
accepts_nested_attributes_for :tracks, :reject_if => proc {|r| r["name"].blank?}, :allow_destroy => true
|
||||
accepts_nested_attributes_for :venue
|
||||
accepts_nested_attributes_for :dietary_choices, :allow_destroy => true
|
||||
accepts_nested_attributes_for :supporter_levels, :allow_destroy => true
|
||||
accepts_nested_attributes_for :event_types, :allow_destroy => true
|
||||
accepts_nested_attributes_for :email_settings
|
||||
|
||||
|
|
|
|||
7
app/models/dietary_choice.rb
Normal file
7
app/models/dietary_choice.rb
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
class DietaryChoice < ActiveRecord::Base
|
||||
attr_accessible :title
|
||||
|
||||
belongs_to :conference
|
||||
has_many :registrations
|
||||
|
||||
end
|
||||
|
|
@ -1,9 +1,14 @@
|
|||
class Registration < ActiveRecord::Base
|
||||
belongs_to :person
|
||||
belongs_to :conference
|
||||
belongs_to :dietary_choice
|
||||
|
||||
has_one :supporter_registration
|
||||
|
||||
attr_accessible :person_id, :conference_id, :attending_social_events, :attending_social_events_with_partner,
|
||||
:using_affiliated_lodging, :arrival, :departure, :person_attributes
|
||||
accepts_nested_attributes_for :person
|
||||
:using_affiliated_lodging, :arrival, :departure, :person_attributes, :other_dietary_choice, :dietary_choice_id,
|
||||
:handicapped_access_required, :supporter_registration_attributes
|
||||
|
||||
accepts_nested_attributes_for :person
|
||||
accepts_nested_attributes_for :supporter_registration
|
||||
end
|
||||
6
app/models/supporter_level.rb
Normal file
6
app/models/supporter_level.rb
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
class SupporterLevel < ActiveRecord::Base
|
||||
belongs_to :conference
|
||||
has_many :supporter_registrations
|
||||
|
||||
attr_accessible :conference, :title, :url
|
||||
end
|
||||
6
app/models/supporter_registration.rb
Normal file
6
app/models/supporter_registration.rb
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
class SupporterRegistration < ActiveRecord::Base
|
||||
belongs_to :supporter_level
|
||||
belongs_to :registration
|
||||
|
||||
attr_accessible :registration, :supporter_level_id, :code, :code_is_valid
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue