about summary refs log tree commit diff
path: root/app/models/mention.rb
diff options
context:
space:
mode:
authorMatt Jankowski <mjankowski@thoughtbot.com>2017-05-31 14:38:17 -0400
committerEugen Rochko <eugen@zeonfederated.com>2017-05-31 20:38:17 +0200
commitb25e42a77f4b3472bc519e8a394b2cfe0e063e4c (patch)
tree7c541e3aab0268ffb9bbb7d4e2d97b91e413778c /app/models/mention.rb
parent5236a6286107f5731c5f57940592a46ebd3c6107 (diff)
Misc tidying and clean ups (#3445)
* Remove trailing whitespace in i18n mailers

* Use query methods instead of #present? on AR attributes

* Delegate Status#account_domain method

* Delegate Mention #account_username and #account_acct methods
Diffstat (limited to 'app/models/mention.rb')
-rw-r--r--app/models/mention.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/mention.rb b/app/models/mention.rb
index a8d243259..7450b1b85 100644
--- a/app/models/mention.rb
+++ b/app/models/mention.rb
@@ -17,4 +17,11 @@ class Mention < ApplicationRecord
   has_one :notification, as: :activity, dependent: :destroy
 
   validates :account, uniqueness: { scope: :status }
+
+  delegate(
+    :username,
+    :acct,
+    to: :account,
+    prefix: true
+  )
 end