about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/concerns/application.rb8
-rw-r--r--app/models/status.rb2
2 files changed, 10 insertions, 0 deletions
diff --git a/app/models/concerns/application.rb b/app/models/concerns/application.rb
new file mode 100644
index 000000000..613be34ee
--- /dev/null
+++ b/app/models/concerns/application.rb
@@ -0,0 +1,8 @@
+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 bc595c93b..8301ae16e 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -7,6 +7,8 @@ class Status < ApplicationRecord
 
   enum visibility: [:public, :unlisted, :private], _suffix: :visibility
 
+  belongs_to :application, class_name: 'Doorkeeper::Application'
+
   belongs_to :account, inverse_of: :statuses
   belongs_to :in_reply_to_account, foreign_key: 'in_reply_to_account_id', class_name: 'Account'