about summary refs log tree commit diff
path: root/app/models/mention.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/mention.rb
parent93e53a3311c33b218d1cf7ae26b74056dfabc909 (diff)
parentfc7b8307190b8f472b526d99bc10db58153850d5 (diff)
Merge branch 'master' into master
Diffstat (limited to 'app/models/mention.rb')
-rw-r--r--app/models/mention.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/models/mention.rb b/app/models/mention.rb
index 10a9cb1cd..03e76fcc4 100644
--- a/app/models/mention.rb
+++ b/app/models/mention.rb
@@ -1,11 +1,10 @@
 # frozen_string_literal: true
 
 class Mention < ApplicationRecord
-  belongs_to :account, inverse_of: :mentions
-  belongs_to :status
+  belongs_to :account, inverse_of: :mentions, required: true
+  belongs_to :status, required: true
 
   has_one :notification, as: :activity, dependent: :destroy
 
-  validates :account, :status, presence: true
   validates :account, uniqueness: { scope: :status }
 end