mirror of
https://github.com/openSUSE/osem.git
synced 2026-02-18 15:05:54 -05:00
11 lines
317 B
Ruby
11 lines
317 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Subscription < ApplicationRecord
|
|
belongs_to :conference
|
|
belongs_to :user
|
|
|
|
has_paper_trail on: %i(create destroy), ignore: [:updated_at], meta: { conference_id: :conference_id }
|
|
|
|
validates :user_id, uniqueness: { scope: :conference_id, message: 'already subscribed!' }
|
|
end
|