mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 03:07:52 +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
|