Add database row to hold status content type
This commit is contained in:
@ -24,6 +24,7 @@
|
||||
# local_only :boolean
|
||||
# full_status_text :text default(""), not null
|
||||
# poll_id :bigint(8)
|
||||
# content_type :string
|
||||
#
|
||||
|
||||
class Status < ApplicationRecord
|
||||
@ -74,6 +75,7 @@ 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) }, allow_nil: true
|
||||
|
||||
accepts_nested_attributes_for :poll
|
||||
|
||||
|
Reference in New Issue
Block a user