]> cat aescling's git repositories - mastodon.git/commitdiff
Remove arguments in association reader (#3305)
authorYamagishi Kazutoshi <ykzts@desire.sh>
Thu, 25 May 2017 14:28:14 +0000 (23:28 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Thu, 25 May 2017 14:28:14 +0000 (16:28 +0200)
app/models/notification.rb

index fe1fff11fa135a3a93585bfe7f2a80cfd8bc83ef..62c68dfb19fcbbb4ff7de57b395ee27d8287bd18 100644 (file)
@@ -49,7 +49,7 @@ class Notification < ApplicationRecord
   cache_associated :from_account, status: STATUS_INCLUDES, mention: [status: STATUS_INCLUDES], favourite: [:account, status: STATUS_INCLUDES], follow: :account
 
   def activity(eager_loaded = true)
-    eager_loaded ? send(activity_type.downcase) : super
+    eager_loaded ? send(activity_type.underscore) : super()
   end
 
   def type