mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 14:29:53 +01:00
8 lines
248 B
Ruby
8 lines
248 B
Ruby
class Relationship < ApplicationRecord
|
|
belongs_to :source, class_name: 'User'
|
|
belongs_to :target, class_name: 'User'
|
|
validates :source_id, presence: true
|
|
validates :target_id, presence: true
|
|
|
|
default_scope { order(created_at: :asc) }
|
|
end
|