mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-14 04:04:03 +00:00
12 lines
320 B
Ruby
12 lines
320 B
Ruby
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
|