retrospring/app/models/relationship.rb

7 lines
204 B
Ruby
Raw Normal View History

2014-11-30 14:06:05 +01:00
class Relationship < ActiveRecord::Base
2014-11-30 14:43:35 +01:00
belongs_to :source, class_name: 'User'
belongs_to :target, class_name: 'User'
validates :source_id, presence: true
validates :target_id, presence: true
2014-11-30 14:06:05 +01:00
end