drop dietary choices, social events, and html_export_path

This commit is contained in:
Stella Rouzi 2016-03-23 17:18:51 +02:00
parent 1fdd029a86
commit b9e10922ee
13 changed files with 315 additions and 39 deletions

View file

@ -19,11 +19,9 @@ class Conference < ActiveRecord::Base
has_one :email_settings, dependent: :destroy
has_one :program, dependent: :destroy
has_one :venue, dependent: :destroy
has_many :social_events, dependent: :destroy
has_many :ticket_purchases, dependent: :destroy
has_many :supporters, through: :ticket_purchases, source: :user
has_many :tickets, dependent: :destroy
has_many :dietary_choices, dependent: :destroy
has_many :lodgings, dependent: :destroy
has_many :registrations, dependent: :destroy
@ -38,9 +36,7 @@ class Conference < ActiveRecord::Base
has_many :commercials, as: :commercialable, dependent: :destroy
has_many :subscriptions, dependent: :destroy
accepts_nested_attributes_for :social_events, allow_destroy: true
accepts_nested_attributes_for :venue
accepts_nested_attributes_for :dietary_choices, allow_destroy: true
accepts_nested_attributes_for :tickets, allow_destroy: true
accepts_nested_attributes_for :sponsorship_levels, allow_destroy: true
accepts_nested_attributes_for :sponsors, allow_destroy: true

View file

@ -1,4 +0,0 @@
class DietaryChoice < ActiveRecord::Base
belongs_to :conference
has_many :registrations
end

View file

@ -1,9 +1,7 @@
class Registration < ActiveRecord::Base
belongs_to :user
belongs_to :conference
belongs_to :dietary_choice
has_and_belongs_to_many :social_events
has_and_belongs_to_many :events
has_and_belongs_to_many :qanswers
has_and_belongs_to_many :vchoices
@ -12,7 +10,6 @@ class Registration < ActiveRecord::Base
has_many :workshops, through: :events_registrations, source: :event
accepts_nested_attributes_for :user
accepts_nested_attributes_for :social_events
accepts_nested_attributes_for :qanswers
delegate :name, to: :user

View file

@ -12,7 +12,7 @@
# in table 'conferences' looks like a more simple and straightforward solution
#
class RevisionObserver < ActiveRecord::Observer
observe :conference, :event, :room, :social_event, :track
observe :conference, :event, :room, :track
def after_save(model)
begin

View file

@ -1,4 +0,0 @@
class SocialEvent < ActiveRecord::Base
belongs_to :conference
has_and_belongs_to_many :registrations
end