about summary refs log tree commit diff
path: root/app/models/follow_request.rb
diff options
context:
space:
mode:
authorValentin Ouvrard <valentin210594@gmail.com>2017-04-08 13:39:09 +1100
committerGitHub <noreply@github.com>2017-04-08 13:39:09 +1100
commit3e4eb9c95fc8d8f3fff1db90215d5050214adc59 (patch)
treec9f709f2582f8fe97c72b4faa8bc0811bbbb4deb /app/models/follow_request.rb
parent93e53a3311c33b218d1cf7ae26b74056dfabc909 (diff)
parentfc7b8307190b8f472b526d99bc10db58153850d5 (diff)
Merge branch 'master' into master
Diffstat (limited to 'app/models/follow_request.rb')
-rw-r--r--app/models/follow_request.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/models/follow_request.rb b/app/models/follow_request.rb
index 4224ab15d..20e1332dd 100644
--- a/app/models/follow_request.rb
+++ b/app/models/follow_request.rb
@@ -3,12 +3,11 @@
 class FollowRequest < ApplicationRecord
   include Paginable
 
-  belongs_to :account
-  belongs_to :target_account, class_name: 'Account'
+  belongs_to :account, required: true
+  belongs_to :target_account, class_name: 'Account', required: true
 
   has_one :notification, as: :activity, dependent: :destroy
 
-  validates :account, :target_account, presence: true
   validates :account_id, uniqueness: { scope: :target_account_id }
 
   def authorize!