Move common views to partial
This commit is contained in:
parent
b15c1abd2e
commit
969c24c091
16 changed files with 101 additions and 120 deletions
|
|
@ -1,7 +1,5 @@
|
|||
class Registration < ActiveRecord::Base
|
||||
belongs_to :user
|
||||
validates :user, presence: true
|
||||
accepts_nested_attributes_for :user
|
||||
belongs_to :conference
|
||||
belongs_to :dietary_choice
|
||||
|
||||
|
|
@ -29,6 +27,8 @@ class Registration < ActiveRecord::Base
|
|||
|
||||
alias_attribute :other_needs, :other_special_needs
|
||||
|
||||
validates :user, presence: true
|
||||
|
||||
validates_uniqueness_of :user_id, scope: :conference_id, message: 'already Registered!'
|
||||
|
||||
after_create :set_week, :subscribe_to_conference, :send_registration_mail
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue