Big refactoring of registration
- Added datatable gem - Addaed datatable to events, users (#422), registrations
This commit is contained in:
parent
0f1051d24e
commit
d21e19b977
34 changed files with 435 additions and 12988 deletions
|
|
@ -26,7 +26,7 @@ class Conference < ActiveRecord::Base
|
|||
|
||||
has_paper_trail
|
||||
|
||||
has_and_belongs_to_many :questions
|
||||
has_many :questions
|
||||
|
||||
has_one :contact, dependent: :destroy
|
||||
has_one :registration_period, dependent: :destroy
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@ class Registration < ActiveRecord::Base
|
|||
|
||||
alias_attribute :other_needs, :other_special_needs
|
||||
|
||||
validates_uniqueness_of :user_id, scope: :conference_id, message: 'already Registered!'
|
||||
|
||||
after_create :set_week
|
||||
|
||||
def week
|
||||
|
|
|
|||
|
|
@ -3,4 +3,6 @@ class Subscription < ActiveRecord::Base
|
|||
validates_uniqueness_of :user_id, scope: [:conference_id]
|
||||
belongs_to :conference
|
||||
belongs_to :user
|
||||
|
||||
validates_uniqueness_of :user_id, scope: :conference_id, message: 'already subscribed!'
|
||||
end
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@ class User < ActiveRecord::Base
|
|||
has_many :openids
|
||||
|
||||
attr_accessible :email, :password, :password_confirmation, :remember_me, :role_id, :role_ids,
|
||||
:name, :email_public, :biography, :nickname, :affiliation, :is_admin
|
||||
:name, :email_public, :biography, :nickname, :affiliation, :is_admin,
|
||||
:tshirt, :mobile, :volunteer_experience, :languages
|
||||
|
||||
has_many :event_users, dependent: :destroy
|
||||
has_many :events, -> { uniq }, through: :event_users
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue