mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 11:47:56 +01:00
7 lines
128 B
Ruby
7 lines
128 B
Ruby
|
|
class Like < ApplicationRecord
|
||
|
|
belongs_to :user
|
||
|
|
belongs_to :post
|
||
|
|
|
||
|
|
validates :user_id, uniqueness: { scope: :post_id }
|
||
|
|
end
|