Registration for Events
This commit is contained in:
parent
f188fd5575
commit
01ec43e53a
35 changed files with 522 additions and 46 deletions
|
|
@ -1,4 +1,12 @@
|
|||
class EventsRegistration < ActiveRecord::Base
|
||||
belongs_to :registration
|
||||
belongs_to :event
|
||||
|
||||
has_one :user, through: :registration
|
||||
|
||||
delegate :name, to: :registration
|
||||
delegate :email, to: :registration
|
||||
|
||||
validates :event, :registration, presence: true
|
||||
validates :event, uniqueness: { scope: :registration }
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue