mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Cop checks for the use of old-style attribute validation. Supports autocorrection which was run to fix the files concerned Closes #1414
9 lines
349 B
Ruby
9 lines
349 B
Ruby
class Subscription < ActiveRecord::Base
|
|
validates :user_id, uniqueness: { scope: [:conference_id] }
|
|
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
|