0
0
Fork 0

Remove orphaned notifications, add scopes param to app create API

This commit is contained in:
Eugen Rochko 2016-11-21 14:59:13 +01:00
parent 954f344cf7
commit e8c27767aa
6 changed files with 10 additions and 1 deletions

View file

@ -16,6 +16,8 @@ class Status < ApplicationRecord
has_many :media_attachments, dependent: :destroy
has_and_belongs_to_many :tags
has_one :notification, as: :activity, dependent: :destroy
validates :account, presence: true
validates :uri, uniqueness: true, unless: 'local?'
validates :text, presence: true, length: { maximum: 500 }, if: proc { |s| s.local? && !s.reblog? }