User/Person models merge
This commit is contained in:
parent
66b84e3660
commit
23bf55b66c
80 changed files with 1064 additions and 1221 deletions
|
|
@ -1,5 +1,5 @@
|
|||
class Registration < ActiveRecord::Base
|
||||
belongs_to :person
|
||||
belongs_to :user
|
||||
belongs_to :conference
|
||||
belongs_to :dietary_choice
|
||||
|
||||
|
|
@ -10,27 +10,21 @@ class Registration < ActiveRecord::Base
|
|||
has_and_belongs_to_many :qanswers
|
||||
has_and_belongs_to_many :vchoices
|
||||
|
||||
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,
|
||||
attr_accessible :user_id, :conference_id, :attending_social_events, :attending_with_partner,
|
||||
:using_affiliated_lodging, :arrival, :departure, :user_attributes, :other_dietary_choice, :dietary_choice_id,
|
||||
:handicapped_access_required, :supporter_registration_attributes, :social_event_ids, :other_special_needs,
|
||||
:event_ids, :attended, :volunteer, :vchoice_ids,
|
||||
:qanswer_ids, :qanswers_attributes
|
||||
|
||||
accepts_nested_attributes_for :person
|
||||
accepts_nested_attributes_for :user
|
||||
accepts_nested_attributes_for :supporter_registration
|
||||
accepts_nested_attributes_for :social_events
|
||||
accepts_nested_attributes_for :qanswers
|
||||
|
||||
delegate :first_name, :to => :person
|
||||
delegate :last_name, :to => :person
|
||||
delegate :public_name, :to => :person
|
||||
delegate :email, :to => :person
|
||||
delegate :irc_nickname, :to => :person
|
||||
delegate :company, :to => :person
|
||||
delegate :mobile, :to => :person
|
||||
delegate :languages, :to => :person
|
||||
delegate :volunteer_experience, :to => :person
|
||||
delegate :tshirt, :to => :person
|
||||
delegate :name, :to => :user
|
||||
delegate :email, :to => :user
|
||||
delegate :nickname, :to => :user
|
||||
delegate :affiliation, :to => :user
|
||||
|
||||
alias_attribute :other_needs, :other_special_needs
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue