drop dietary choices, social events, and html_export_path
This commit is contained in:
parent
1fdd029a86
commit
b9e10922ee
13 changed files with 315 additions and 39 deletions
|
|
@ -177,10 +177,9 @@ module Admin
|
|||
private
|
||||
|
||||
def conference_params
|
||||
params.require(:conference).permit(:title, :short_title, :description, :timezone, :html_export_path,
|
||||
params.require(:conference).permit(:title, :short_title, :description, :timezone,
|
||||
:start_date, :end_date, :rooms_attributes, :tracks_attributes,
|
||||
:dietary_choices_attributes, :use_dietary_choices,
|
||||
:tickets_attributes, :social_events_attributes, :event_types_attributes,
|
||||
:tickets_attributes, :event_types_attributes,
|
||||
:logo, :questions_attributes,
|
||||
:question_ids, :answers_attributes, :answer_ids, :difficulty_levels_attributes,
|
||||
:use_difficulty_levels, :use_vpositions, :use_vdays, :vdays_attributes,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
class DietaryChoice < ActiveRecord::Base
|
||||
belongs_to :conference
|
||||
has_many :registrations
|
||||
end
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
class SocialEvent < ActiveRecord::Base
|
||||
belongs_to :conference
|
||||
has_and_belongs_to_many :registrations
|
||||
end
|
||||
|
|
@ -13,11 +13,4 @@
|
|||
= u.input :affiliation, placeholder: 'Company/User Group/nothing', as: :string
|
||||
= f.inputs 'Registration Information' do
|
||||
= render partial: 'conference_registrations/registration_info', locals: { f: f }
|
||||
|
||||
-# Not necessary
|
||||
- if @conference.social_events.count > 0
|
||||
= f.inputs 'Are you planning to attend any of the parties?' do
|
||||
%br Yes, I'll be attending...
|
||||
%br
|
||||
= f.input :social_events, as: :check_boxes, label: false, collection: @conference.social_events
|
||||
= f.action :submit, button_html: { class: 'btn btn-primary' }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue