0
0
Fork 0

Fix unfollows

This commit is contained in:
Eugen Rochko 2016-03-16 21:14:39 +01:00
parent 9cb690c706
commit 086d487145
3 changed files with 5 additions and 3 deletions

View file

@ -2,7 +2,7 @@ class Follow < ActiveRecord::Base
belongs_to :account
belongs_to :target_account, class_name: 'Account'
has_one :stream_entry, as: :activity, dependent: :destroy
has_one :stream_entry, as: :activity
validates :account, :target_account, presence: true
validates :account_id, uniqueness: { scope: :target_account_id }