721014c927
This reverts commit 3e99123095
.
8 lines
234 B
Ruby
8 lines
234 B
Ruby
class Subscription < ActiveRecord::Base
|
|
belongs_to :user
|
|
belongs_to :subscribable, polymorphic: true
|
|
|
|
validates :user_id,
|
|
uniqueness: { scope: [:subscribable_id, :subscribable_type] },
|
|
presence: true
|
|
end
|