about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-01-15 14:01:33 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-01-15 14:01:33 +0100
commite9737c2235ec56502e650bd1adad3f32bf85f0ef (patch)
treeececd729f513fd14998f2be30169973956ef6f59 /app/models
parentab165547fdf556b10b80898c030d54e20bff50af (diff)
Fix tests, add applications to eager loading/cache for statuses, fix
application website validation, don't link to app website if website isn't set,
also comment out animated boost icon from #464 until it's consistent with non-animated version
Diffstat (limited to 'app/models')
-rw-r--r--app/models/concerns/application.rb8
-rw-r--r--app/models/status.rb2
2 files changed, 1 insertions, 9 deletions
diff --git a/app/models/concerns/application.rb b/app/models/concerns/application.rb
deleted file mode 100644
index 613be34ee..000000000
--- a/app/models/concerns/application.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-module ApplicationExtension
-  extend ActiveSupport::Concern
-  included do
-    validates :website
-  end
-end
-
-Doorkeeper::Application.send :include, ApplicationExtension
\ No newline at end of file
diff --git a/app/models/status.rb b/app/models/status.rb
index 8301ae16e..5710f9cca 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -35,7 +35,7 @@ class Status < ApplicationRecord
   scope :remote, -> { where.not(uri: nil) }
   scope :local, -> { where(uri: nil) }
 
-  cache_associated :account, :media_attachments, :tags, :stream_entry, mentions: :account, reblog: [:account, :stream_entry, :tags, :media_attachments, mentions: :account], thread: :account
+  cache_associated :account, :application, :media_attachments, :tags, :stream_entry, mentions: :account, reblog: [:account, :application, :stream_entry, :tags, :media_attachments, mentions: :account], thread: :account
 
   def local?
     uri.nil?