forked from gitea/glitch-bird
parent
c0755f1530
commit
1614c8bb35
|
@ -87,6 +87,8 @@ class Status < ApplicationRecord
|
|||
validates_with DisallowedHashtagsValidator
|
||||
validates :reblog, uniqueness: { scope: :account }, if: :reblog?
|
||||
validates :visibility, exclusion: { in: %w(direct limited) }, if: :reblog?
|
||||
validates :content_type, inclusion: { in: %w(text/plain text/markdown text/html) }, allow_nil: true
|
||||
|
||||
accepts_nested_attributes_for :poll
|
||||
|
||||
default_scope { recent.kept }
|
||||
|
|
Loading…
Reference in a new issue