9 lines
311 B
Ruby
9 lines
311 B
Ruby
class Relationship < ActiveRecord::Base
|
|
belongs_to :follower, class_name: "User"
|
|
validates :follower_id, presence: true
|
|
belongs_to :followable, polymorphic: true
|
|
# belongs_to :followed, class_name: "Profile"
|
|
# validates :followed_id, presence: true
|
|
# belongs_to :followerable, polymorphic: true
|
|
end
|